Update p_user.c

This commit is contained in:
Jimita 2018-12-12 13:09:47 -02:00 committed by GitHub
parent 172fd3bf52
commit 966afb6017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8718,8 +8718,7 @@ void P_PlayerThink(player_t *player)
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.
// The timer might've reached zero, but we'll run the remote view camera anyway by setting it to -1.
}
/// \note do this in the cheat code
@ -9498,7 +9497,6 @@ void P_PlayerAfterThink(player_t *player)
}
}
// Reset it to zero if it's a -1.
if (player->awayviewtics < 0)
player->awayviewtics = 0;