From 3b07747af42940bffb138ad49f7c50c57bd82900 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sat, 19 Oct 2024 10:17:01 -0400 Subject: [PATCH] Revert "- simplify and deconstruct logic for applying sector damage - also fixes voodoo doll sector damage in TNT MAP30" This reverts commit 3e33e31d1961f366229d5b4848fa29d2d797b8c3. Revert "Added MF9_FORCESECTORDAMAGE." This reverts commit 61bd3a739a0ca7509db46ddabbff1fc35bfd8908. --- src/playsim/actor.h | 1 - src/playsim/p_mobj.cpp | 6 +----- src/scripting/thingdef_data.cpp | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/playsim/actor.h b/src/playsim/actor.h index 708e06f4c69..759d9d26281 100644 --- a/src/playsim/actor.h +++ b/src/playsim/actor.h @@ -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 --- diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index 32f650ca506..8d34e6c73ba 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -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); diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index 90ba65f0085..129c06b7869 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -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),