diff --git a/sources/Zeds/NiceMonster.uc b/sources/Zeds/NiceMonster.uc index 4162201..32fcb4e 100644 --- a/sources/Zeds/NiceMonster.uc +++ b/sources/Zeds/NiceMonster.uc @@ -2039,14 +2039,26 @@ function bool MeleeDamageTarget(int hitDamage, Vector pushDir){ } return true; } -state ZombieDying { - ignores AnimEnd, Trigger, Bump, HitWall, HeadVolumeChange, + + +state ZombieDying +{ + ignores AnimEnd, Trigger, Bump, HitWall, HeadVolumeChange, PhysicsVolumeChange, Falling, BreathTimer, Died, RangedAttack; + + // #1 disable zed collisions on death + simulated function BeginState() + { + super.BeginState(); + DisableCollisions(); + } + simulated function Landed(vector HitNormal){ SetCollision(false, false, false); if(!bDestroyNextTick) Disable('Tick'); } + simulated function TakeDamageClient(int damage, Pawn InstigatedBy, Vector hitLocation, @@ -2095,6 +2107,29 @@ state ZombieDying { } } } + + +// #2 disable zed collisions on death +simulated function PlayDying(class DamageType, vector HitLoc) +{ + super.PlayDying(DamageType, HitLoc); + DisableCollisions(); +} + + +// disables all collisions +simulated function DisableCollisions() +{ + bBlockActors = false; + bBlockPlayers = false; + bBlockProjectiles = false; + bProjTarget = false; + bBlockZeroExtentTraces = false; + bBlockNonZeroExtentTraces = false; + bBlockHitPointTraces = false; +} + + defaultproperties { stunDurationMultiplier=0.5