- fixed: ACS's APROP_ViewHeight needs to check if a real player is attached to a PlayerPawn.

This commit is contained in:
Christoph Oelckers 2019-04-07 23:45:08 +02:00
parent f4f1c4abbf
commit f6d3de76cf

View file

@ -4372,7 +4372,7 @@ int DLevelScript::GetActorProperty (int tid, int property)
case APROP_Radius: return DoubleToACS(actor->radius); case APROP_Radius: return DoubleToACS(actor->radius);
case APROP_ReactionTime:return actor->reactiontime; case APROP_ReactionTime:return actor->reactiontime;
case APROP_MeleeRange: return DoubleToACS(actor->meleerange); case APROP_MeleeRange: return DoubleToACS(actor->meleerange);
case APROP_ViewHeight: if (actor->IsKindOf(NAME_PlayerPawn)) case APROP_ViewHeight: if (actor->player)
{ {
return DoubleToACS(actor->player->DefaultViewHeight()); return DoubleToACS(actor->player->DefaultViewHeight());
} }