- Added A_SetSize(double newradius, double newheight = -1).

- Changes the calling actor's radius and height.
This commit is contained in:
Major Cooke 2016-12-17 12:46:40 -06:00 committed by Christoph Oelckers
parent 2fea46a719
commit 3023af8223
2 changed files with 17 additions and 0 deletions

View file

@ -6846,3 +6846,19 @@ DEFINE_ACTION_FUNCTION(AActor, A_CheckTerrain)
}
return 0;
}
DEFINE_ACTION_FUNCTION(AActor, A_SetSize)
{
PARAM_SELF_PROLOGUE(AActor);
PARAM_FLOAT(newradius);
PARAM_FLOAT_DEF(newheight);
if (newradius < 0.) newradius = self->radius;
if (newheight < 0.) newheight = self->Height;
self->UnlinkFromWorld();
self->radius = newradius;
self->Height = newheight;
self->LinkToWorld();
return 0;
}