diff --git a/src/playsim/actor.h b/src/playsim/actor.h index 8bcc4c91d74..9c8ca78836a 100644 --- a/src/playsim/actor.h +++ b/src/playsim/actor.h @@ -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. diff --git a/src/rendering/hwrenderer/scene/hw_drawlist.cpp b/src/rendering/hwrenderer/scene/hw_drawlist.cpp index 2b92bd0117f..b31431d8de2 100644 --- a/src/rendering/hwrenderer/scene/hw_drawlist.cpp +++ b/src/rendering/hwrenderer/scene/hw_drawlist.cpp @@ -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)); diff --git a/src/rendering/hwrenderer/scene/hw_sprites.cpp b/src/rendering/hwrenderer/scene/hw_sprites.cpp index 8ee3de1a2e9..bffccf404ed 100644 --- a/src/rendering/hwrenderer/scene/hw_sprites.cpp +++ b/src/rendering/hwrenderer/scene/hw_sprites.cpp @@ -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; diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index b918c45b2ed..e81961a6a9a 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -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),