Skip to content

Commit

Permalink
Revert "- simplify and deconstruct logic for applying sector damage -…
Browse files Browse the repository at this point in the history
… also fixes voodoo doll sector damage in TNT MAP30"

This reverts commit 3e33e31.

Revert "Added MF9_FORCESECTORDAMAGE."

This reverts commit 61bd3a7.
  • Loading branch information
madame-rachelle committed Oct 19, 2024
1 parent 7692746 commit 3b07747
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/playsim/actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ enum ActorFlag9
MF9_DECOUPLEDANIMATIONS = 0x00000010, // [RL0] Decouple model animations from states
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.
};

// --- mobj.renderflags ---
Expand Down
6 changes: 1 addition & 5 deletions src/playsim/p_mobj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4436,11 +4436,7 @@ void AActor::Tick ()
if (ObjectFlags & OF_EuthanizeMe) return;
}
//[inkoalawetrust] Genericized level damage handling that makes sector, 3D floor, and TERRAIN flat damage affect monsters and other NPCs too.
bool afsdnope = !!(flags9 & MF9_NOSECTORDAMAGE);
bool afsdforce = !!(flags9 & MF9_FORCESECTORDAMAGE);
bool sfhurtmonsters = !!(Sector->MoreFlags & SECMF_HURTMONSTERS);
bool isplayer = (player != nullptr) && (this == player->mo);
if ((!afsdnope || afsdforce) && (isplayer || sfhurtmonsters || afsdforce))
if (!(flags9 & MF9_NOSECTORDAMAGE) && (player || (player == nullptr && Sector->MoreFlags & SECMF_HURTMONSTERS)))
{
P_ActorOnSpecial3DFloor(this);
P_ActorInSpecialSector(this,Sector);
Expand Down
1 change: 0 additions & 1 deletion src/scripting/thingdef_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ static FFlagDef ActorFlagDefs[]=
DEFINE_FLAG(MF9, DECOUPLEDANIMATIONS, AActor, flags9),
DEFINE_FLAG(MF9, NOSECTORDAMAGE, AActor, flags9),
DEFINE_PROTECTED_FLAG(MF9, ISPUFF, AActor, flags9), //[AA] was spawned by SpawnPuff
DEFINE_FLAG(MF9, FORCESECTORDAMAGE, AActor, flags9),

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

0 comments on commit 3b07747

Please sign in to comment.