Merge pull request #367 from monster-psychic-cat/the_second_remote_view_camera_fix

Fix remote viewpoint cameras for real this time
This commit is contained in:
Alam Arias 2018-12-18 15:00:59 -05:00 committed by GitHub
commit ba00752c71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 5 deletions

View File

@ -8719,9 +8719,14 @@ 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 by setting it to -1.
}
/// \note do this in the cheat code /// \note do this in the cheat code
if (player->pflags & PF_NOCLIP) if (player->pflags & PF_NOCLIP)
@ -9499,8 +9504,8 @@ void P_PlayerAfterThink(player_t *player)
} }
} }
if (player->awayviewtics) if (player->awayviewtics < 0)
player->awayviewtics--; player->awayviewtics = 0;
// spectator invisibility and nogravity. // spectator invisibility and nogravity.
if ((netgame || multiplayer) && player->spectator) if ((netgame || multiplayer) && player->spectator)