Accessed None 'Killer' fix

This commit is contained in:
Shtoyan 2022-01-20 22:23:07 +04:00
parent 3247720a46
commit 692b66b9a6

View File

@ -536,16 +536,22 @@ simulated function NonRelevantSpeedupTick(float deltaTime){
SetGroundSpeed(GetOriginalGroundSpeed()); SetGroundSpeed(GetOriginalGroundSpeed());
} }
} }
// Kill zed if it has been bleeding long enough // Kill zed if it has been bleeding long enough
simulated function BleedOutTick(float deltaTick){ simulated function BleedOutTick(float deltaTick)
if(Role < ROLE_Authority || !bDecapitated) return; {
if(BleedOutTime <= 0 || Level.TimeSeconds < BleedOutTime) return; if (Role < ROLE_Authority || !bDecapitated)
return;
if (BleedOutTime <= 0 || Level.TimeSeconds < BleedOutTime)
return;
if (LastDamagedBy != none) if (LastDamagedBy != none)
Died(LastDamagedBy.Controller, class'DamTypeBleedOut', Location); Died(LastDamagedBy.Controller, class'DamTypeBleedOut', Location);
// else we can say we killed ourselves, none -> self
else else
Died(none, class'DamTypeBleedOut', Location); Died(self, class'DamTypeBleedOut', Location);
BleedOutTime = 0; BleedOutTime = 0;
} }
// FX-stuff TWI did in the tick, unchanged // FX-stuff TWI did in the tick, unchanged
simulated function TWIFXTick(float deltaTime){ simulated function TWIFXTick(float deltaTime){
if(Level.netMode == NM_DedicatedServer) return; if(Level.netMode == NM_DedicatedServer) return;