diff --git a/src/actor.h b/src/actor.h index 0336c4185..1d1090c19 100644 --- a/src/actor.h +++ b/src/actor.h @@ -407,12 +407,14 @@ enum ActorRenderFlag RF_SPRITETYPEMASK = 0x7000, // ---Different sprite types, not all implemented RF_FACESPRITE = 0x0000, // Face sprite RF_WALLSPRITE = 0x1000, // Wall sprite - RF_FLOORSPRITE = 0x2000, // Floor sprite + RF_FLATSPRITE = 0x2000, // Flat sprite RF_VOXELSPRITE = 0x3000, // Voxel object + RF_PITCHFLATSPRITE = 0x4000, // [MC] Flat sprite that rotates around pitch (GZDoom only) RF_INVISIBLE = 0x8000, // Don't bother drawing this actor 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. @@ -974,6 +976,7 @@ public: DVector3 OldRenderPos; DRotator Angles; + DAngle FlatAngle; DVector3 Vel; double Speed; double FloatSpeed; diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index b7d887195..77e862028 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -262,7 +262,8 @@ void AActor::Serialize(FArchive &arc) << projectilepassheight << Vel << tics - << state; + << state + << FlatAngle; if (arc.IsStoring()) { int dmg; diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 34a9cf02c..20848f478 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -6881,3 +6881,25 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FaceMovementDirection) } ACTION_RETURN_BOOL(true); } + +//=========================================================================== +// +// A_SetFlatAngle +// +// Set actor's flat angle (in degrees). GZDoom only. Requires the +// (PITCH)FLATSPRITE flag to have any visible effect. +// +//=========================================================================== +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetFlatAngle) +{ + PARAM_ACTION_PROLOGUE; + PARAM_FLOAT_OPT(flatangle) { flatangle = 0; } + PARAM_INT_OPT(ptr) { ptr = AAPTR_DEFAULT; } + + AActor *ref = COPY_AAPTR(self, ptr); + if (ref != NULL) + { + ref->FlatAngle = flatangle; + } + return 0; +} \ No newline at end of file diff --git a/src/thingdef/thingdef_data.cpp b/src/thingdef/thingdef_data.cpp index efb7be0c2..8b245e828 100644 --- a/src/thingdef/thingdef_data.cpp +++ b/src/thingdef/thingdef_data.cpp @@ -265,6 +265,11 @@ static FFlagDef ActorFlagDefs[]= DEFINE_FLAG(RF, INVISIBLE, AActor, renderflags), DEFINE_FLAG(RF, FORCEYBILLBOARD, AActor, renderflags), DEFINE_FLAG(RF, FORCEXYBILLBOARD, AActor, renderflags), + DEFINE_FLAG(RF, ROLLSPRITE, AActor, renderflags), // [marrub] roll the sprite billboard + // [fgsfds] Flat sprites + DEFINE_FLAG(RF, FLATSPRITE, AActor, renderflags), + DEFINE_FLAG(RF, WALLSPRITE, AActor, renderflags), + DEFINE_FLAG(RF, PITCHFLATSPRITE, AActor, renderflags), // Bounce flags DEFINE_FLAG2(BOUNCE_Walls, BOUNCEONWALLS, AActor, BounceFlags), diff --git a/src/version.h b/src/version.h index 21d05b3ed..68c7d0325 100644 --- a/src/version.h +++ b/src/version.h @@ -72,11 +72,11 @@ const char *GetVersionString(); // SAVESIG should match SAVEVER. // MINSAVEVER is the minimum level snapshot version that can be loaded. -#define MINSAVEVER 4545 +#define MINSAVEVER 4546 // Use 4500 as the base git save version, since it's higher than the // SVN revision ever got. -#define SAVEVER 4545 +#define SAVEVER 4546 #define SAVEVERSTRINGIFY2(x) #x #define SAVEVERSTRINGIFY(x) SAVEVERSTRINGIFY2(x) diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 8b35be30d..f47a1d87a 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -325,6 +325,7 @@ ACTOR Actor native //: Thinker native state A_CheckSightOrRange(float distance, state label, bool two_dimension = false); native state A_CheckRange(float distance, state label, bool two_dimension = false); action native bool A_FaceMovementDirection(float offset = 0, float anglelimit = 0, float pitchlimit = 0, int flags = 0, int ptr = AAPTR_DEFAULT); + action native A_SetFlatAngle(float flatangle = 0, int ptr = AAPTR_DEFAULT); native void A_RearrangePointers(int newtarget, int newmaster = AAPTR_DEFAULT, int newtracer = AAPTR_DEFAULT, int flags=0); native void A_TransferPointer(int ptr_source, int ptr_recepient, int sourcefield, int recepientfield=AAPTR_DEFAULT, int flags=0);