ModHeadDamage accessed none KFPRI fixed
This commit is contained in:
parent
31a99d413b
commit
6d94cbd61c
@ -750,6 +750,7 @@ function ModFireDamage( out int damage,
|
|||||||
if(bFireImmune)
|
if(bFireImmune)
|
||||||
damage /= 10;
|
damage /= 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ModHeadDamage( out int damage,
|
function ModHeadDamage( out int damage,
|
||||||
Pawn instigatedBy,
|
Pawn instigatedBy,
|
||||||
Vector hitLocation,
|
Vector hitLocation,
|
||||||
@ -757,22 +758,35 @@ function ModHeadDamage( out int damage,
|
|||||||
class<NiceWeaponDamageType> dmgType,
|
class<NiceWeaponDamageType> dmgType,
|
||||||
float headshotLevel,
|
float headshotLevel,
|
||||||
KFPlayerReplicationInfo KFPRI,
|
KFPlayerReplicationInfo KFPRI,
|
||||||
optional float lockonTime){
|
optional float lockonTime)
|
||||||
local bool shouldCountHS;
|
{
|
||||||
local NicePlayerController nicePlayer;
|
local bool shouldCountHS;
|
||||||
local class<NiceVeterancyTypes> niceVet;
|
local NicePlayerController nicePlayer;
|
||||||
if(instigatedBy != none)
|
local class<NiceVeterancyTypes> niceVet;
|
||||||
nicePlayer = NicePlayerController(instigatedBy.Controller);
|
|
||||||
shouldCountHS = (lockonTime >= dmgType.default.lockonTime)
|
if (instigatedBy != none)
|
||||||
|
nicePlayer = NicePlayerController(instigatedBy.Controller);
|
||||||
|
shouldCountHS = (lockonTime >= dmgType.default.lockonTime)
|
||||||
&& (headshotLevel > dmgType.default.prReqMultiplier);
|
&& (headshotLevel > dmgType.default.prReqMultiplier);
|
||||||
// Weapon damage bonus
|
|
||||||
if(dmgType != none && shouldCountHS)
|
// Weapon damage bonus
|
||||||
damage *= dmgType.default.HeadShotDamageMult;
|
if (dmgType != none && shouldCountHS)
|
||||||
// Perk damage bonus
|
damage *= dmgType.default.HeadShotDamageMult;
|
||||||
niceVet = class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill);
|
|
||||||
if(KFPRI != none && niceVet != none)
|
// Perk damage bonus
|
||||||
damage *= niceVet.static.GetNiceHeadShotDamMulti(KFPRI, self, dmgType);
|
if (KFPRI != none)
|
||||||
|
{
|
||||||
|
niceVet = class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill);
|
||||||
|
if (niceVet != none)
|
||||||
|
damage *= niceVet.static.GetNiceHeadShotDamMulti(KFPRI, self, dmgType);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function must record damage actual value in 'damage' variable and
|
// This function must record damage actual value in 'damage' variable and
|
||||||
// return value that will decide stun/flinch
|
// return value that will decide stun/flinch
|
||||||
function int ModBodyDamage( out int damage,
|
function int ModBodyDamage( out int damage,
|
||||||
|
Loading…
Reference in New Issue
Block a user