mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 07:12:36 +00:00
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:
parent
2e4bf697b8
commit
c56d70f2b1
3 changed files with 7 additions and 2 deletions
|
@ -66,6 +66,8 @@ enum EParticleFlags
|
||||||
SPF_NO_XY_BILLBOARD = 1 << 8,
|
SPF_NO_XY_BILLBOARD = 1 << 8,
|
||||||
SPF_LOCAL_ANIM = 1 << 9,
|
SPF_LOCAL_ANIM = 1 << 9,
|
||||||
SPF_NEGATIVE_FADESTEP = 1 << 10,
|
SPF_NEGATIVE_FADESTEP = 1 << 10,
|
||||||
|
SPF_FACECAMERA = 1 << 11,
|
||||||
|
SPF_NOFACECAMERA = 1 << 12,
|
||||||
};
|
};
|
||||||
|
|
||||||
class DVisualThinker;
|
class DVisualThinker;
|
||||||
|
|
|
@ -400,8 +400,9 @@ bool HWSprite::CalculateVertices(HWDrawInfo* di, FVector3* v, DVector3* vp)
|
||||||
&& (gl_billboard_mode == 1 || (actor && actor->renderflags & RF_FORCEXYBILLBOARD))));
|
&& (gl_billboard_mode == 1 || (actor && actor->renderflags & RF_FORCEXYBILLBOARD))));
|
||||||
|
|
||||||
const bool drawBillboardFacingCamera = hw_force_cambbpref ? gl_billboard_faces_camera :
|
const bool drawBillboardFacingCamera = hw_force_cambbpref ? gl_billboard_faces_camera :
|
||||||
(gl_billboard_faces_camera && (actor && !(actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA)))
|
gl_billboard_faces_camera
|
||||||
|| !!(actor && actor->renderflags2 & RF2_BILLBOARDFACECAMERA);
|
&& ((actor && (!(actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA) || (actor->renderflags2 & RF2_BILLBOARDFACECAMERA)))
|
||||||
|
|| (particle && particle->texture.isValid() && (!(particle->flags & SPF_NOFACECAMERA) || (particle->flags & SPF_FACECAMERA))));
|
||||||
|
|
||||||
// [Nash] has +ROLLSPRITE
|
// [Nash] has +ROLLSPRITE
|
||||||
const bool drawRollSpriteActor = (actor != nullptr && actor->renderflags & RF_ROLLSPRITE);
|
const bool drawRollSpriteActor = (actor != nullptr && actor->renderflags & RF_ROLLSPRITE);
|
||||||
|
|
|
@ -715,6 +715,8 @@ enum EParticleFlags
|
||||||
SPF_NO_XY_BILLBOARD = 1 << 8,
|
SPF_NO_XY_BILLBOARD = 1 << 8,
|
||||||
SPF_LOCAL_ANIM = 1 << 9,
|
SPF_LOCAL_ANIM = 1 << 9,
|
||||||
SPF_NEGATIVE_FADESTEP = 1 << 10,
|
SPF_NEGATIVE_FADESTEP = 1 << 10,
|
||||||
|
SPF_FACECAMERA = 1 << 11,
|
||||||
|
SPF_NOFACECAMERA = 1 << 12,
|
||||||
|
|
||||||
SPF_RELATIVE = SPF_RELPOS|SPF_RELVEL|SPF_RELACCEL|SPF_RELANG
|
SPF_RELATIVE = SPF_RELPOS|SPF_RELVEL|SPF_RELACCEL|SPF_RELANG
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue