Fix some issues with changing player viewheight at runtime

- Viewheight change was delayed: Viewheight must be copied to player
  structure as well as the PlayerPawn. Not sure if should actually use
  deltaviewheight to spread the change out over a few tics instead of
  being instant.
- Viewheight not preserved when travelling: player->viewheight must be
  restored from pawn->ViewHeight, because the temporary player set it back
  to the default viewheight.
This commit is contained in:
Randy Heit 2015-04-22 23:22:27 -05:00
commit 8d501fdb9f
3 changed files with 8 additions and 0 deletions

View file

@ -169,6 +169,7 @@ void FS_EmulateCmd(char * string)
{
// No, this is not correct. But this is the way Legacy WADs expect it to be handled!
if (players[i].mo != NULL) players[i].mo->ViewHeight = playerviewheight;
players[i].viewheight = playerviewheight;
players[i].Uncrouch();
}
while (sc.GetString())