disable zed collisions on death
This commit is contained in:
parent
271205fbc9
commit
a907cf9e86
@ -2039,14 +2039,26 @@ function bool MeleeDamageTarget(int hitDamage, Vector pushDir){
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
state ZombieDying {
|
|
||||||
ignores AnimEnd, Trigger, Bump, HitWall, HeadVolumeChange,
|
|
||||||
|
state ZombieDying
|
||||||
|
{
|
||||||
|
ignores AnimEnd, Trigger, Bump, HitWall, HeadVolumeChange,
|
||||||
PhysicsVolumeChange, Falling, BreathTimer, Died, RangedAttack;
|
PhysicsVolumeChange, Falling, BreathTimer, Died, RangedAttack;
|
||||||
|
|
||||||
|
// #1 disable zed collisions on death
|
||||||
|
simulated function BeginState()
|
||||||
|
{
|
||||||
|
super.BeginState();
|
||||||
|
DisableCollisions();
|
||||||
|
}
|
||||||
|
|
||||||
simulated function Landed(vector HitNormal){
|
simulated function Landed(vector HitNormal){
|
||||||
SetCollision(false, false, false);
|
SetCollision(false, false, false);
|
||||||
if(!bDestroyNextTick)
|
if(!bDestroyNextTick)
|
||||||
Disable('Tick');
|
Disable('Tick');
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function TakeDamageClient(int damage,
|
simulated function TakeDamageClient(int damage,
|
||||||
Pawn InstigatedBy,
|
Pawn InstigatedBy,
|
||||||
Vector hitLocation,
|
Vector hitLocation,
|
||||||
@ -2095,6 +2107,29 @@ state ZombieDying {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #2 disable zed collisions on death
|
||||||
|
simulated function PlayDying(class<DamageType> 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
|
defaultproperties
|
||||||
{
|
{
|
||||||
stunDurationMultiplier=0.5
|
stunDurationMultiplier=0.5
|
||||||
|
Loading…
Reference in New Issue
Block a user