Skip to content

Commit

Permalink
- simplify and deconstruct logic for applying sector damage - also fi…
Browse files Browse the repository at this point in the history
…xes voodoo doll sector damage in TNT MAP30
  • Loading branch information
madame-rachelle committed Oct 14, 2024
1 parent 9df656a commit 3e33e31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/playsim/p_mobj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4436,7 +4436,11 @@ 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.
if ((!(flags9 & MF9_NOSECTORDAMAGE) || flags9 & MF9_FORCESECTORDAMAGE) && (player || (player == nullptr && (Sector->MoreFlags & SECMF_HURTMONSTERS || flags9 & MF9_FORCESECTORDAMAGE))))
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))
{
P_ActorOnSpecial3DFloor(this);
P_ActorInSpecialSector(this,Sector);
Expand Down

0 comments on commit 3e33e31

Please sign in to comment.