mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-13 22:42:07 +00:00
- add actor flag +BILLBOARDNOFACECAMERA which forces sprite aimed at camera heading instead of camera position when gl_billboard_faces_camera is true
``` class ZombieManNoFaceCamera : Zombieman replaces Zombieman { default { +BILLBOARDNOFACECAMERA; } } ```
This commit is contained in:
parent
97336cf7c2
commit
b4d5c7d669
4 changed files with 10 additions and 3 deletions
|
@ -497,6 +497,7 @@ enum ActorRenderFlag2
|
|||
RF2_INVISIBLEINMIRRORS = 0x0001, // [Nash] won't render in mirrors
|
||||
RF2_ONLYVISIBLEINMIRRORS = 0x0002, // [Nash] only renders in mirrors
|
||||
RF2_BILLBOARDFACECAMERA = 0x0004, // Sprite billboard face camera (override gl_billboard_faces_camera)
|
||||
RF2_BILLBOARDNOFACECAMERA = 0x0008, // Sprite billboard face camera angle (override gl_billboard_faces_camera)
|
||||
};
|
||||
|
||||
// This translucency value produces the closest match to Heretic's TINTTAB.
|
||||
|
|
|
@ -523,7 +523,9 @@ void HWDrawList::SortSpriteIntoWall(HWDrawInfo *di, SortNode * head,SortNode * s
|
|||
const bool drawWithXYBillboard = ((ss->particle && gl_billboard_particles) || (!(ss->actor && ss->actor->renderflags & RF_FORCEYBILLBOARD)
|
||||
&& (gl_billboard_mode == 1 || (ss->actor && ss->actor->renderflags & RF_FORCEXYBILLBOARD))));
|
||||
|
||||
const bool drawBillboardFacingCamera = gl_billboard_faces_camera || (ss->actor && ss->actor->renderflags2 & RF2_BILLBOARDFACECAMERA);
|
||||
const bool drawBillboardFacingCamera = (gl_billboard_faces_camera && (ss->actor && !(ss->actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA)))
|
||||
|| (ss->actor && ss->actor->renderflags2 & RF2_BILLBOARDFACECAMERA);
|
||||
|
||||
// [Nash] has +ROLLSPRITE
|
||||
const bool rotated = (ss->actor != nullptr && ss->actor->renderflags & (RF_ROLLSPRITE | RF_WALLSPRITE | RF_FLATSPRITE));
|
||||
|
||||
|
|
|
@ -386,7 +386,9 @@ bool HWSprite::CalculateVertices(HWDrawInfo *di, FVector3 *v, DVector3 *vp)
|
|||
//&& di->mViewActor != nullptr
|
||||
&& (gl_billboard_mode == 1 || (actor && actor->renderflags & RF_FORCEXYBILLBOARD))));
|
||||
|
||||
const bool drawBillboardFacingCamera = gl_billboard_faces_camera || !!(actor && actor->renderflags2 & RF2_BILLBOARDFACECAMERA);
|
||||
const bool drawBillboardFacingCamera = (gl_billboard_faces_camera && (actor && !(actor->renderflags2 & RF2_BILLBOARDNOFACECAMERA)))
|
||||
|| !!(actor && actor->renderflags2 & RF2_BILLBOARDFACECAMERA);
|
||||
|
||||
// [Nash] has +ROLLSPRITE
|
||||
const bool drawRollSpriteActor = (actor != nullptr && actor->renderflags & RF_ROLLSPRITE);
|
||||
|
||||
|
@ -1136,7 +1138,8 @@ void HWSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t
|
|||
trans = 1.f;
|
||||
|
||||
if (!gl_sprite_blend || modelframe ||
|
||||
(thing->renderflags & (RF_FLATSPRITE | RF_WALLSPRITE)) || gl_billboard_faces_camera ||
|
||||
(thing->renderflags & (RF_FLATSPRITE | RF_WALLSPRITE)) ||
|
||||
(gl_billboard_faces_camera && !(thing->renderflags2 & RF2_BILLBOARDNOFACECAMERA)) ||
|
||||
thing->renderflags2 & RF2_BILLBOARDFACECAMERA)
|
||||
{
|
||||
RenderStyle.SrcAlpha = STYLEALPHA_One;
|
||||
|
|
|
@ -379,6 +379,7 @@ static FFlagDef ActorFlagDefs[]=
|
|||
DEFINE_FLAG(RF2, INVISIBLEINMIRRORS, AActor, renderflags2),
|
||||
DEFINE_FLAG(RF2, ONLYVISIBLEINMIRRORS, AActor, renderflags2),
|
||||
DEFINE_FLAG(RF2, BILLBOARDFACECAMERA, AActor, renderflags2),
|
||||
DEFINE_FLAG(RF2, BILLBOARDNOFACECAMERA, AActor, renderflags2),
|
||||
|
||||
// Bounce flags
|
||||
DEFINE_FLAG2(BOUNCE_Walls, BOUNCEONWALLS, AActor, BounceFlags),
|
||||
|
|
Loading…
Reference in a new issue