mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
- simplify and deconstruct logic for applying sector damage - also fixes voodoo doll sector damage in TNT MAP30
This commit is contained in:
parent
0785038120
commit
2f30f720a4
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue