Skip to content

Commit

Permalink
Added SPF_ROLLCENTER for particles and visual thinkers.
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorCooke authored and madame-rachelle committed Jun 23, 2024
1 parent c56d70f commit 5fc3d44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/playsim/p_effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ enum EParticleFlags
SPF_NEGATIVE_FADESTEP = 1 << 10,
SPF_FACECAMERA = 1 << 11,
SPF_NOFACECAMERA = 1 << 12,
SPF_ROLLCENTER = 1 << 13,
};

class DVisualThinker;
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/hwrenderer/scene/hw_sprites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ bool HWSprite::CalculateVertices(HWDrawInfo* di, FVector3* v, DVector3* vp)

// [Nash] is a flat sprite
const bool isWallSprite = (actor != nullptr) && (spritetype == RF_WALLSPRITE);
const bool useOffsets = (actor != nullptr) && !(actor->renderflags & RF_ROLLCENTER);
const bool useOffsets = ((actor != nullptr) && !(actor->renderflags & RF_ROLLCENTER)) || (particle && !(particle->flags & SPF_ROLLCENTER));

FVector2 offset = FVector2( offx, offy );
float xx = -center.X + x;
Expand Down
1 change: 1 addition & 0 deletions wadsrc/static/zscript/constants.zs
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ enum EParticleFlags
SPF_NEGATIVE_FADESTEP = 1 << 10,
SPF_FACECAMERA = 1 << 11,
SPF_NOFACECAMERA = 1 << 12,
SPF_ROLLCENTER = 1 << 13,

SPF_RELATIVE = SPF_RELPOS|SPF_RELVEL|SPF_RELACCEL|SPF_RELANG
};
Expand Down

0 comments on commit 5fc3d44

Please sign in to comment.