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