zedtest3 #3

Merged
dkanus merged 15 commits from :zedtest3 into master 2022-01-21 11:56:43 +03:00
Showing only changes of commit 0f987e9a1e - Show all commits

View File

@ -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 NiceHumanPawn nicePawn; local bool bHasManiac;
bHasManiac = class'NiceVeterancyTypes'.static. local NiceHumanPawn nicePawn;
HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac');
nicePawn = NiceHumanPawn(killer.pawn); if (killer != none || (Controller != none && killer != Controller))
if(bHasManiac && nicePawn != none) {
nicePawn.maniacTimeout = bHasManiac = class'NiceVeterancyTypes'.static.
class'NiceSkillDemoManiac'.default.reloadBoostTime; HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac');
super.Died(killer, damageType, HitLocation); nicePawn = NiceHumanPawn(killer.pawn);
if (bHasManiac && nicePawn != none)
nicePawn.maniacTimeout =
class'NiceSkillDemoManiac'.default.reloadBoostTime;
}
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;