another attempt to fix accessed none killer
This commit is contained in:
parent
692b66b9a6
commit
0f987e9a1e
@ -546,9 +546,10 @@ simulated function BleedOutTick(float deltaTick)
|
|||||||
return;
|
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 we can say we killed ourselves, none -> controller (self)
|
||||||
|
// P.S. we really need to use Suicide here D:
|
||||||
else
|
else
|
||||||
Died(self, class'DamTypeBleedOut', Location);
|
Died(controller, class'DamTypeBleedOut', Location);
|
||||||
BleedOutTime = 0;
|
BleedOutTime = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1083,19 +1084,27 @@ function DealBodyDamage(int damage,
|
|||||||
damageType, headshotLevel);
|
damageType, headshotLevel);
|
||||||
MakeNoise(1.0);
|
MakeNoise(1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Died( Controller killer,
|
function Died( Controller killer,
|
||||||
class<DamageType> damageType,
|
class<DamageType> damageType,
|
||||||
vector HitLocation){
|
vector HitLocation)
|
||||||
|
{
|
||||||
local bool bHasManiac;
|
local bool bHasManiac;
|
||||||
local NiceHumanPawn nicePawn;
|
local NiceHumanPawn nicePawn;
|
||||||
|
|
||||||
|
if (killer != none || (Controller != none && killer != Controller))
|
||||||
|
{
|
||||||
bHasManiac = class'NiceVeterancyTypes'.static.
|
bHasManiac = class'NiceVeterancyTypes'.static.
|
||||||
HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac');
|
HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac');
|
||||||
nicePawn = NiceHumanPawn(killer.pawn);
|
nicePawn = NiceHumanPawn(killer.pawn);
|
||||||
if (bHasManiac && nicePawn != none)
|
if (bHasManiac && nicePawn != none)
|
||||||
nicePawn.maniacTimeout =
|
nicePawn.maniacTimeout =
|
||||||
class'NiceSkillDemoManiac'.default.reloadBoostTime;
|
class'NiceSkillDemoManiac'.default.reloadBoostTime;
|
||||||
|
}
|
||||||
|
|
||||||
super.Died(killer, damageType, HitLocation);
|
super.Died(killer, damageType, HitLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
simulated function SetTearOffMomemtum(vector NewMomentum){
|
simulated function SetTearOffMomemtum(vector NewMomentum){
|
||||||
TearOffMomentum = NewMomentum;
|
TearOffMomentum = NewMomentum;
|
||||||
TearOffMomentumX = NewMomentum.X;
|
TearOffMomentumX = NewMomentum.X;
|
||||||
|
Loading…
Reference in New Issue
Block a user