static bool Prefix(UIElement __instance, ref Vector2 pos) { var mode = NetworkMatch.GetMode(); var fitSingle = MPTeams.NetworkMatchTeamCount == 2 && NetworkMatch.m_players.Count <= 8; if (MPModPrivateData.MatchMode == ExtMatchMode.RACE) { return(true); } if (mode == MatchMode.ANARCHY || ((mode == MatchMode.TEAM_ANARCHY || mode == MatchMode.MONSTERBALL) && fitSingle)) { return(true); } float colReduce = fitSingle ? 0 : 50f; float col1 = fitSingle ? -330f : -250f; float col2 = 100f - colReduce; float col3 = 190f - colReduce; float col4 = 280f - colReduce; float col5 = 350f - colReduce; MpTeam myTeam = GameManager.m_local_player.m_mp_team; int col = 0; float x = pos.x; float y = pos.y; float[] ys = new float[2] { pos.y, pos.y }; foreach (var team in MPTeams.TeamsByScore) { pos.x = x + (fitSingle ? 0 : col == 0 ? -325f : 325f); pos.y = ys[col]; MPTeams.DrawTeamScore(__instance, pos, team, NetworkMatch.GetTeamScore(team), col5, team == myTeam); pos.y += 35f; if (ys[col] == y || fitSingle) // only draw header for first team in column { MPTeams.DrawScoreHeader(__instance, pos, col1, col2, col3, col4, col5, false); pos.y += 15f; __instance.DrawVariableSeparator(pos, 350f); pos.y += 20f; } int num = MPTeams.DrawScoresForTeam(__instance, team, pos, col1, col2, col3, col4, col5); pos.y += (float)num * 25f + 35f; ys[col] = pos.y; if (!fitSingle) { col = 1 - col; } } pos.y = Mathf.Max(ys[0], ys[1]); return(false); }