Added SpriteAngle and SpriteRotation properties.

- Includes four functions, A_SetSprite(Angle/Rotation) and GetSprite(Angle/Rotation).
- SpriteRotation offsets the angle of the sprite, allowing for actors to move backwards or sideways for example.
- SpriteAngle requires +SPRITEANGLE and sets the actor's sprite to the absolute rotation found at that angle. Overrides SpriteRotation once the flag is on.
This commit is contained in:
Major Cooke 2016-07-28 15:52:20 -05:00 committed by Christoph Oelckers
commit dfed6ac1fb
8 changed files with 154 additions and 5 deletions

View file

@ -382,6 +382,7 @@ enum ActorFlag7
MF7_ALLOWTHRUFLAGS = 0x00400000, // [MC] Allow THRUACTORS and the likes on puffs to prevent mod breakage.
MF7_USEKILLSCRIPTS = 0x00800000, // [JM] Use "KILL" Script on death if not forced by GameInfo.
MF7_NOKILLSCRIPTS = 0x01000000, // [JM] No "KILL" Script on death whatsoever, even if forced by GameInfo.
MF7_SPRITEANGLE = 0x02000000, // [MC] Utilize the SpriteAngle property and lock the rotation to the degrees specified.
};
// --- mobj.renderflags ---
@ -978,6 +979,8 @@ public:
DVector3 __Pos; // double underscores so that it won't get used by accident. Access to this should be exclusively through the designated access functions.
DVector3 OldRenderPos;
DAngle SpriteAngle;
DAngle SpriteRotation;
DRotator Angles;
DVector3 Vel;
double Speed;