Re-added sector damage for non-players. (#2773)
* Re-add non-player sector damage. Reimplements SECMF_HURTMONSTERS and SECMF_HARMINAIR. * Fixed 3D floor handling for sector damage. Fixes sector damage to either monsters or players not working on (non-)solid 3D floors.
This commit is contained in:
parent
12c6d1361a
commit
34dc204517
14 changed files with 100 additions and 57 deletions
|
|
@ -4435,6 +4435,14 @@ void AActor::Tick ()
|
|||
// must have been removed
|
||||
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.
|
||||
P_ActorOnSpecial3DFloor(this); //3D floors must be checked separately to see if their control sector allows non-player damage
|
||||
if (checkForSpecialSector(this,Sector))
|
||||
{
|
||||
P_ActorInSpecialSector(this,Sector);
|
||||
if (!isAbove(Sector->floorplane.ZatPoint(this)) || waterlevel) // Actor must be touching the floor for TERRAIN flats.
|
||||
P_ActorOnSpecialFlat(this, P_GetThingFloorType(this));
|
||||
}
|
||||
|
||||
if (tics != -1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue