Aded FLIPSPRITEOFFSET<X/Y> for actors and bFlipOffset<X/Y> for visual thinkers.

- Inverts the direction that (Sprite)Offset pushes the sprite without affecting *any* other offsets, allowing them to combine seemlessly.
This commit is contained in:
Major Cooke 2024-01-19 21:29:57 -06:00 committed by Rachael Alexanderson
commit 278ebf3202
8 changed files with 37 additions and 11 deletions

View file

@ -81,7 +81,7 @@ namespace swrenderer
const double thingxscalemul = spriteScale.X / tex->GetScale().X;
// Calculate billboard line for the sprite
double SpriteOffX = (thing) ? thing->SpriteOffset.X : 0.;
double SpriteOffX = (thing) ? -thing->GetSpriteOffset(false) : 0.;
DVector2 dir = { viewport->viewpoint.Sin, -viewport->viewpoint.Cos };
DVector2 trs = pos.XY() - viewport->viewpoint.Pos.XY();
trs = { trs.X + SpriteOffX * dir.X, trs.Y + SpriteOffX * dir.Y };