Added MF9_FORCESECTORDAMAGE.

This flag forces non-player actors to take  damage from hurt floors even if SECMF_HURTMONSTERS isn't true.
This commit is contained in:
inkoalawetrust 2024-10-01 16:13:41 +03:00 committed by Ricardo Luís Vaz Silva
commit 61bd3a739a
3 changed files with 3 additions and 1 deletions

View file

@ -4436,7 +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.
if (!(flags9 & MF9_NOSECTORDAMAGE) && (player || (player == nullptr && Sector->MoreFlags & SECMF_HURTMONSTERS)))
if ((!(flags9 & MF9_NOSECTORDAMAGE) || flags9 & MF9_FORCESECTORDAMAGE) && (player || (player == nullptr && (Sector->MoreFlags & SECMF_HURTMONSTERS || flags9 & MF9_FORCESECTORDAMAGE))))
{
P_ActorOnSpecial3DFloor(this);
P_ActorInSpecialSector(this,Sector);