Skip to content

Commit

Permalink
fix player allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
cylonicboom committed Aug 18, 2024
1 parent 3202ead commit 66101b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/game/playermgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ void playermgrAllocatePlayersFromRoles(void)
if (g_Vars.playerroles[i]) {
playermgrAllocatePlayer(playercount);
if (g_Vars.playerroles[i] == PLAYERROLE_COOP) {
g_Vars.coopplayers[i] = g_Vars.players[playercount];
g_Vars.coopplayers[playercount] = g_Vars.players[playercount];
g_Vars.coop = g_Vars.players[playercount];
g_Vars.currentcoopplayernum = i;
g_Vars.currentcoopplayernum = playercount;
// HACK: So functions that are coop / anti exclusive can still work
// these will be synced when the playernum changes during the level
g_Vars.antiplayernum = -1;
}
else if (g_Vars.playerroles[i] == PLAYERROLE_ANTI) {
g_Vars.antiplayers[i] = g_Vars.players[playercount];
g_Vars.antiplayers[playercount] = g_Vars.players[playercount];
g_Vars.anti = g_Vars.players[playercount];
g_Vars.currentantiplayernum = i;
// HACK: So functions that are coop / anti exclusive can still work
Expand Down

0 comments on commit 66101b3

Please sign in to comment.