Reduce zed's stun time
This commit is contained in:
parent
c536198a52
commit
710bc8e504
@ -121,8 +121,8 @@ simulated event SetAnimAction(name NewAction)
|
||||
function float GetStunDurationMult(Pawn instigatedBy, Vector hitLocation, Vector momentum, class<NiceWeaponDamageType> damageType,
|
||||
float headshotLevel, KFPlayerReplicationInfo KFPRI){
|
||||
if(headshotLevel > 0)
|
||||
return 1.0;
|
||||
return 0.5;
|
||||
return stunDurationMultiplier;
|
||||
return 0.5 * stunDurationMultiplier;
|
||||
}
|
||||
|
||||
function SpawnTwoShots(){
|
||||
|
@ -49,6 +49,8 @@ enum EPainReaction{
|
||||
// but can be configured by changing a variable's value)
|
||||
// Defines if zed is currently stunned
|
||||
var bool bIsStunned;
|
||||
// By how much to change stun duration for the zed?
|
||||
var float stunDurationMultiplier;
|
||||
// Stun score (defined as ratio of the default health), required to stun a zed;
|
||||
// always expected to be positive.
|
||||
var float stunThreshold;
|
||||
@ -1190,12 +1192,13 @@ function float GetstunDurationMult( Pawn instigatedBy,
|
||||
KFPlayerReplicationInfo KFPRI){
|
||||
local class<NiceVeterancyTypes> niceVet;
|
||||
// Default out
|
||||
if(KFPRI == none) return 1.0;
|
||||
if(KFPRI == none) return stunDurationMultiplier;
|
||||
niceVet = class<NiceVeterancyTypes>(KFPRI.ClientVeteranSkill);
|
||||
if(niceVet == none) return 1.0;
|
||||
if(niceVet == none) return stunDurationMultiplier;
|
||||
// Perk's bonuses out
|
||||
return niceVet.static.stunDurationMult( KFPRI, self, KFPawn(instigatedBy),
|
||||
damageType);
|
||||
return stunDurationMultiplier *
|
||||
niceVet.static.stunDurationMult( KFPRI, self, KFPawn(instigatedBy),
|
||||
damageType);
|
||||
}
|
||||
function bool IsStunPossible(){
|
||||
return (remainingStuns != 0 || bIsStunned);
|
||||
@ -2094,6 +2097,7 @@ state ZombieDying {
|
||||
}
|
||||
defaultproperties
|
||||
{
|
||||
stunDurationMultiplier=0.5
|
||||
StunThreshold=0.666000
|
||||
remainingStuns=-1
|
||||
lastStunTime=-1.000000
|
||||
|
Loading…
Reference in New Issue
Block a user