Skip to content

Commit

Permalink
Added NOAUTOOFFSKULLFLY flag
Browse files Browse the repository at this point in the history
Disables resetting skullfly and state when velocity is zero while charging.
  • Loading branch information
Boondorl authored and RicardoLuis0 committed Jan 30, 2025
1 parent 5bcbe17 commit d527829
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/playsim/actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ enum ActorFlag9
MF9_NOSECTORDAMAGE = 0x00000020, // [inkoalawetrust] Actor ignores any sector-based damage (i.e damaging floors, NOT crushers)
MF9_ISPUFF = 0x00000040, // [AA] Set on actors by P_SpawnPuff
MF9_FORCESECTORDAMAGE = 0x00000080, // [inkoalawetrust] Actor ALWAYS takes hurt floor damage if there's any. Even if the floor doesn't have SECMF_HURTMONSTERS.
MF9_NOAUTOOFFSKULLFLY = 0x00000100, // Don't automatically disable MF_SKULLFLY if velocity is 0.
};

// --- mobj.renderflags ---
Expand Down
2 changes: 1 addition & 1 deletion src/playsim/p_mobj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,7 @@ static double P_XYMovement (AActor *mo, DVector2 scroll)

if (move.isZero())
{
if (mo->flags & MF_SKULLFLY)
if ((mo->flags & MF_SKULLFLY) && !(mo->flags9 & MF9_NOAUTOOFFSKULLFLY))
{
// the skull slammed into something
mo->flags &= ~MF_SKULLFLY;
Expand Down
1 change: 1 addition & 0 deletions src/scripting/thingdef_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ static FFlagDef ActorFlagDefs[]=
DEFINE_FLAG(MF9, NOSECTORDAMAGE, AActor, flags9),
DEFINE_PROTECTED_FLAG(MF9, ISPUFF, AActor, flags9), //[AA] was spawned by SpawnPuff
DEFINE_FLAG(MF9, FORCESECTORDAMAGE, AActor, flags9),
DEFINE_FLAG(MF9, NOAUTOOFFSKULLFLY, AActor, flags9),

// Effect flags
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
Expand Down

0 comments on commit d527829

Please sign in to comment.