From 53837de17dd86407fc3fba2a61faf3aa35b78001 Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Sun, 5 Jun 2016 15:21:19 -0500 Subject: [PATCH] Added DONTFLIP flag. - By default, when viewing a flat sprite from behind, the image is flipped around on the X axis. This may not always be desired, so this flag disables it. --- src/actor.h | 3 ++- src/thingdef/thingdef_data.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/actor.h b/src/actor.h index e5fb4384e..333059ce5 100644 --- a/src/actor.h +++ b/src/actor.h @@ -410,10 +410,11 @@ enum ActorRenderFlag RF_FLATSPRITE = 0x2000, // Flat sprite RF_VOXELSPRITE = 0x3000, // Voxel object RF_INVISIBLE = 0x8000, // Don't bother drawing this actor + RF_ROLLSPRITE = 0x40000, //[marrub]roll the sprite billboard + RF_DONTFLIP = 0x80000, // Don't flip it when viewed from behind. RF_FORCEYBILLBOARD = 0x10000, // [BB] OpenGL only: draw with y axis billboard, i.e. anchored to the floor (overrides gl_billboard_mode setting) RF_FORCEXYBILLBOARD = 0x20000, // [BB] OpenGL only: draw with xy axis billboard, i.e. unanchored (overrides gl_billboard_mode setting) - RF_ROLLSPRITE = 0x40000, //[marrub]roll the sprite billboard }; // This translucency value produces the closest match to Heretic's TINTTAB. diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index 49b6b0dd8..b9e6414ff 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -269,6 +269,7 @@ static FFlagDef ActorFlagDefs[]= // [fgsfds] Flat sprites DEFINE_FLAG(RF, FLATSPRITE, AActor, renderflags), DEFINE_FLAG(RF, WALLSPRITE, AActor, renderflags), + DEFINE_FLAG(RF, DONTFLIP, AActor, renderflags), // Bounce flags DEFINE_FLAG2(BOUNCE_Walls, BOUNCEONWALLS, AActor, BounceFlags),