forgot about splitscreen oops

This commit is contained in:
Alug 2024-03-30 02:17:30 +01:00
parent aaaf09aea3
commit 65c3d90340
1 changed files with 16 additions and 4 deletions

View File

@ -8054,10 +8054,16 @@ boolean P_SpectatorJoinGame(player_t *player)
player->kartstuff[k_spectatewait] = 0;
player->ctfteam = changeto;
player->playerstate = PST_REBORN;
//center camera if its not already
if ((P_IsLocalPlayer(player)) && localaiming[0] != 0)
if ((P_IsLocalPlayer(player)) && player == &players[consoleplayer] && localaiming[0] != 0)
localaiming[0] = 0;
else if ((P_IsLocalPlayer(player)) && player == &players[displayplayers[1]] && localaiming[1] != 0)
localaiming[1] = 0;
else if ((P_IsLocalPlayer(player)) && player == &players[displayplayers[2]] && localaiming[2] != 0)
localaiming[2] = 0;
else if ((P_IsLocalPlayer(player)) && player == &players[displayplayers[3]] && localaiming[3] != 0)
localaiming[3] = 0;
//Reset away view
if (P_IsLocalPlayer(player) && displayplayers[0] != consoleplayer)
@ -8082,10 +8088,16 @@ boolean P_SpectatorJoinGame(player_t *player)
player->pflags &= ~PF_WANTSTOJOIN;
player->kartstuff[k_spectatewait] = 0;
player->playerstate = PST_REBORN;
//center camera if its not already
if ((P_IsLocalPlayer(player)) && localaiming[0] != 0)
if ((P_IsLocalPlayer(player)) && player == &players[consoleplayer] && localaiming[0] != 0)
localaiming[0] = 0;
else if ((P_IsLocalPlayer(player)) && player == &players[displayplayers[1]] && localaiming[1] != 0)
localaiming[1] = 0;
else if ((P_IsLocalPlayer(player)) && player == &players[displayplayers[2]] && localaiming[2] != 0)
localaiming[2] = 0;
else if ((P_IsLocalPlayer(player)) && player == &players[displayplayers[3]] && localaiming[3] != 0)
localaiming[3] = 0;
//Reset away view
if (P_IsLocalPlayer(player) && displayplayers[0] != consoleplayer)