static bool Prefix(UIElement __instance, ref Vector2 pos) { if (MPModPrivateData.MatchMode == ExtMatchMode.RACE) { Race.DrawMpMiniScoreboard(ref pos, __instance); return(false); } if (NetworkMatch.GetMode() == MatchMode.ANARCHY || MPTeams.NetworkMatchTeamCount == 2) { return(true); } int match_time_remaining = NetworkMatch.m_match_time_remaining; int match_time = (int)NetworkMatch.m_match_elapsed_seconds; pos.y -= 15f; __instance.DrawDigitsTime(pos + Vector2.right * 95f, (float)match_time_remaining, 0.45f, (match_time <= 10 || match_time_remaining >= 10) ? UIManager.m_col_ui2 : UIManager.m_col_em5, __instance.m_alpha, false); pos.y -= 3f; MpTeam myTeam = GameManager.m_local_player.m_mp_team; foreach (var team in MPTeams.TeamsByScore) { pos.y += 28f; int score = NetworkMatch.GetTeamScore(team); MPTeams.DrawTeamScoreSmall(__instance, pos, team, score, 98f, team == myTeam); } pos.y += 6f; return(false); }
static bool Prefix(UIElement __instance, ref Vector2 pos) { if (!GameplayManager.IsMultiplayerActive || NetworkMatch.GetMode() == MatchMode.ANARCHY || MPTeams.NetworkMatchTeamCount == 2) { return(true); } var uie = __instance; pos.x -= 4f; pos.y -= 5f; Vector2 temp_pos; temp_pos.y = pos.y; temp_pos.x = pos.x - 100f; uie.DrawStringSmall(NetworkMatch.GetModeString(MatchMode.NUM), temp_pos, 0.4f, StringOffset.LEFT, UIManager.m_col_ub0, 1f, 130f); temp_pos.x = pos.x + 95f; int match_time_remaining = NetworkMatch.m_match_time_remaining; int num3 = (int)NetworkMatch.m_match_elapsed_seconds; uie.DrawDigitsTime(temp_pos, (float)match_time_remaining, 0.45f, (num3 <= 10 || match_time_remaining >= 10) ? UIManager.m_col_ui2 : UIManager.m_col_em5, uie.m_alpha, false); temp_pos.x = pos.x - 100f; temp_pos.y = temp_pos.y - 20f; uie.DrawPing(temp_pos); pos.y += 24f; MpTeam myTeam = GameManager.m_local_player.m_mp_team; foreach (var team in MPTeams.TeamsByScore) { MPTeams.DrawTeamScoreSmall(__instance, pos, team, NetworkMatch.GetTeamScore(team), 98f, team == myTeam); pos.y += 28f; } pos.y += 6f - 28f; pos.y += 22f; pos.x += 100f; uie.DrawRecentKillsMP(pos); if (GameManager.m_player_ship.m_wheel_select_state == WheelSelectState.QUICK_CHAT) { pos.y = UIManager.UI_TOP + 128f; pos.x = -448f; uie.DrawQuickChatWheel(pos); } else { pos.y = UIManager.UI_TOP + 60f; pos.x = UIManager.UI_LEFT + 5f; uie.DrawQuickChatMP(pos); } return(false); }