- floatified viewheight variables and some related code.
This commit is contained in:
parent
af427b80bd
commit
6b3c0ecbd3
14 changed files with 90 additions and 82 deletions
|
|
@ -3998,10 +3998,10 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
|||
case APROP_ViewHeight:
|
||||
if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn)))
|
||||
{
|
||||
static_cast<APlayerPawn *>(actor)->ViewHeight = value;
|
||||
static_cast<APlayerPawn *>(actor)->ViewHeight = ACSToDouble(value);
|
||||
if (actor->player != NULL)
|
||||
{
|
||||
actor->player->viewheight = value;
|
||||
actor->player->viewheight = ACSToDouble(value);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -4093,7 +4093,7 @@ int DLevelScript::GetActorProperty (int tid, int property)
|
|||
case APROP_MeleeRange: return actor->meleerange;
|
||||
case APROP_ViewHeight: if (actor->IsKindOf (RUNTIME_CLASS (APlayerPawn)))
|
||||
{
|
||||
return static_cast<APlayerPawn *>(actor)->ViewHeight;
|
||||
return DoubleToACS(static_cast<APlayerPawn *>(actor)->ViewHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4994,7 +4994,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
|
|||
{
|
||||
if (actor->player != NULL)
|
||||
{
|
||||
return actor->player->mo->ViewHeight + actor->player->crouchviewdelta;
|
||||
return DoubleToACS(actor->player->mo->ViewHeight + actor->player->crouchviewdelta);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue