Skip to content

Commit

Permalink
Change gMapSides when knife round swaps. (#753)
Browse files Browse the repository at this point in the history
This should fix Side Restore Issues in #699.
  • Loading branch information
PhlexPlexico authored Jun 26, 2022
1 parent fecc768 commit c5aaf4f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripting/get5/kniferounds.sp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ static void PerformSideSwap(bool swap) {
}
}
}
// Make sure g_MapSides has the correct values as well,
// that way set starting teams won't swap on round 0,
// since a temp valve backup does not exist.
if (g_TeamSide[MatchTeam_Team1] == CS_TEAM_CT)
g_MapSides.Set(GetMapNumber(), SideChoice_Team1CT);
else
g_MapSides.Set(GetMapNumber(), SideChoice_Team1T);
} else {
g_TeamSide[MatchTeam_Team1] = TEAM1_STARTING_SIDE;
g_TeamSide[MatchTeam_Team2] = TEAM2_STARTING_SIDE;
Expand Down

0 comments on commit c5aaf4f

Please sign in to comment.