mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-30 14:21:51 +00:00
Fix remote viewpoint cameras for real
I'm so sorry
This commit is contained in:
parent
6b5fc921f2
commit
c68875ad93
1 changed files with 12 additions and 5 deletions
17
src/p_user.c
17
src/p_user.c
|
@ -8712,9 +8712,15 @@ void P_PlayerThink(player_t *player)
|
||||||
if (player->flashcount)
|
if (player->flashcount)
|
||||||
player->flashcount--;
|
player->flashcount--;
|
||||||
|
|
||||||
// By the time P_MoveChaseCamera is called, this might be zero. Do not do it here.
|
// Re-fixed by Jimita (11-12-2018)
|
||||||
//if (player->awayviewtics)
|
if (player->awayviewtics)
|
||||||
// player->awayviewtics--;
|
{
|
||||||
|
player->awayviewtics--;
|
||||||
|
if (!player->awayviewtics)
|
||||||
|
player->awayviewtics = -1;
|
||||||
|
// The timer might've reached zero, but we'll run the remote view camera anyway.
|
||||||
|
// This is completely fine to do, since -1 evaluates to true in a "if (!player->awayviewtics)" conditional.
|
||||||
|
}
|
||||||
|
|
||||||
/// \note do this in the cheat code
|
/// \note do this in the cheat code
|
||||||
if (player->pflags & PF_NOCLIP)
|
if (player->pflags & PF_NOCLIP)
|
||||||
|
@ -9492,8 +9498,9 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player->awayviewtics)
|
// Reset it to zero if it's a -1.
|
||||||
player->awayviewtics--;
|
if (player->awayviewtics < 0)
|
||||||
|
player->awayviewtics = 0;
|
||||||
|
|
||||||
// spectator invisibility and nogravity.
|
// spectator invisibility and nogravity.
|
||||||
if ((netgame || multiplayer) && player->spectator)
|
if ((netgame || multiplayer) && player->spectator)
|
||||||
|
|
Loading…
Reference in a new issue