center camera when joining from spec

the camera never gets centered proper if you join from spectator
This commit is contained in:
Alug 2023-11-21 15:24:32 +01:00
parent 62294dfe35
commit e2605ff16c

View file

@ -8054,6 +8054,10 @@ 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)
localaiming[0] = 0;
//Reset away view
if (P_IsLocalPlayer(player) && displayplayers[0] != consoleplayer)
@ -8078,6 +8082,9 @@ 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)
//Reset away view
if (P_IsLocalPlayer(player) && displayplayers[0] != consoleplayer)