ResetPSprite
Jump to navigation
Jump to search
Note: This feature is for ZScript only. |
Classes:Weapon
action void ResetPSprite(PSprite psp)
Usage
This is a Weapon function that can be called from a Weapon state on a PSprite pointer to reset its position, scale, rotation and pivot.
ZScript definition
Note: The ZScript definition below is for reference and may be different in the current version of GZDoom.The most up-to-date version of this code can be found on GZDoom GitHub. |
action void ResetPSprite(PSprite psp)
{
if (!psp) return;
psp.rotation = 0;
psp.baseScale.x = invoker.WeaponScaleX;
psp.baseScale.y = invoker.WeaponScaleY;
psp.scale.x = 1;
psp.scale.y = 1;
psp.pivot.x = 0;
psp.pivot.y = 0;
psp.valign = 0;
psp.halign = 0;
psp.Coord0 = (0,0);
psp.Coord1 = (0,0);
psp.Coord2 = (0,0);
psp.Coord3 = (0,0);
}