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

@ -1229,6 +1229,7 @@ void G_FinishTravel ()
pawn->lastenemy = NULL;
pawn->player->mo = pawn;
pawn->player->camera = pawn;
pawn->player->viewheight = pawn->ViewHeight;
pawn->flags2 &= ~MF2_BLASTED;
DObject::StaticPointerSubstitution (oldpawn, pawn);
oldpawn->Destroy();