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:
parent
ca16d99445
commit
8d501fdb9f
3 changed files with 8 additions and 0 deletions
|
|
@ -3899,7 +3899,13 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
|||
|
||||
case APROP_ViewHeight:
|
||||
if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn)))
|
||||
{
|
||||
static_cast<APlayerPawn *>(actor)->ViewHeight = value;
|
||||
if (actor->player != NULL)
|
||||
{
|
||||
actor->player->viewheight = value;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case APROP_AttackZOffset:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue