Added SPF_(NO)FACECAMERA flagst for specifying camera facing on particles and visual thinkers.

- This also adds ensures facing camera is applied to these via the option menu.
This commit is contained in:
Major Cooke 2024-06-23 09:05:45 -05:00 committed by Rachael Alexanderson
parent 2e4bf697b8
commit c56d70f2b1
3 changed files with 7 additions and 2 deletions

View file

@ -66,6 +66,8 @@ enum EParticleFlags
SPF_NO_XY_BILLBOARD = 1 << 8,
SPF_LOCAL_ANIM = 1 << 9,
SPF_NEGATIVE_FADESTEP = 1 << 10,
SPF_FACECAMERA = 1 << 11,
SPF_NOFACECAMERA = 1 << 12,
};
class DVisualThinker;

View file

@ -400,8 +400,9 @@ bool HWSprite::CalculateVertices(HWDrawInfo* di, FVector3* v, DVector3* vp)
&& (gl_billboard_mode == 1 || (actor && actor->renderflags & RF_FORCEXYBILLBOARD))));
const bool drawBillboardFacingCamera = hw_force_cambbpref ? gl_billboard_faces_camera :
(gl_billboard_faces_camera && (actor && !(actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA)))
|| !!(actor && actor->renderflags2 & RF2_BILLBOARDFACECAMERA);
gl_billboard_faces_camera
&& ((actor && (!(actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA) || (actor->renderflags2 & RF2_BILLBOARDFACECAMERA)))
|| (particle && particle->texture.isValid() && (!(particle->flags & SPF_NOFACECAMERA) || (particle->flags & SPF_FACECAMERA))));
// [Nash] has +ROLLSPRITE
const bool drawRollSpriteActor = (actor != nullptr && actor->renderflags & RF_ROLLSPRITE);

View file

@ -715,6 +715,8 @@ enum EParticleFlags
SPF_NO_XY_BILLBOARD = 1 << 8,
SPF_LOCAL_ANIM = 1 << 9,
SPF_NEGATIVE_FADESTEP = 1 << 10,
SPF_FACECAMERA = 1 << 11,
SPF_NOFACECAMERA = 1 << 12,
SPF_RELATIVE = SPF_RELPOS|SPF_RELVEL|SPF_RELACCEL|SPF_RELANG
};