weaponswitch speed

This commit is contained in:
unknown 2021-08-21 10:53:27 -07:00
parent d36068787a
commit d750a2a6d0
3 changed files with 20 additions and 0 deletions

Binary file not shown.

View File

@ -894,6 +894,14 @@ simulated function float GetPenetrationModifier(byte Level, class<KFDamageType>
return (Ext_PerkSupport(CurrentPerk)!=None ? Ext_PerkSupport(CurrentPerk).GetPenetrationModifier(Level, DamageType, bForce) : 0.f); return (Ext_PerkSupport(CurrentPerk)!=None ? Ext_PerkSupport(CurrentPerk).GetPenetrationModifier(Level, DamageType, bForce) : 0.f);
} }
// SwitchSpeed
simulated function ModifyWeaponSwitchTime( out float ModifiedSwitchTime )
{
if( CurrentPerk!=None )
CurrentPerk.ModifyWeaponSwitchTime(ModifiedSwitchTime);
}
// Other // Other
function ApplySkillsToPawn() function ApplySkillsToPawn()
{ {

View File

@ -109,6 +109,7 @@ var localized string StatFireDmg;
var localized string StatAllDmg; var localized string StatAllDmg;
var localized string StatHeadDamage; var localized string StatHeadDamage;
var localized string StatHealRecharge; var localized string StatHealRecharge;
var localized string StatSwitch;
reliable client simulated function string UIName(FDefPerkStat DefPerkStat) reliable client simulated function string UIName(FDefPerkStat DefPerkStat)
{ {
@ -135,6 +136,7 @@ reliable client simulated function string UIName(FDefPerkStat DefPerkStat)
case name("AllDmg"): return StatAllDmg; case name("AllDmg"): return StatAllDmg;
case name("HeadDamage"): return StatHeadDamage; case name("HeadDamage"): return StatHeadDamage;
case name("HealRecharge"): return StatHealRecharge; case name("HealRecharge"): return StatHealRecharge;
case name("Switch"): return StatSwitch;
} }
return ""; return "";
} }
@ -1237,6 +1239,9 @@ simulated function float ApplyEffect(name Type, float Value, float Progress)
case 'HealRecharge': case 'HealRecharge':
Modifiers[20] = 1.f / (1.f+Value*Progress); Modifiers[20] = 1.f / (1.f+Value*Progress);
break; break;
case 'Switch':
Modifiers[21] = 1.f / (1.f+Value*Progress);
break;
} }
return (Value*Progress); return (Value*Progress);
} }
@ -1467,6 +1472,11 @@ simulated function float GetIronSightSpeedModifier(KFWeapon KFW)
return 1.f; return 1.f;
} }
simulated function ModifyWeaponSwitchTime( out float ModifiedSwitchTime )
{
ModifiedSwitchTime *= Modifiers[21];
}
function OnWaveEnded(); function OnWaveEnded();
function NotifyZedTimeStarted(); function NotifyZedTimeStarted();
@ -1548,6 +1558,7 @@ defaultproperties
DefPerkStats(18)=(MaxValue=500,CostPerValue=1,StatType="AllDmg",Progress=0.25) DefPerkStats(18)=(MaxValue=500,CostPerValue=1,StatType="AllDmg",Progress=0.25)
DefPerkStats(19)=(MaxValue=500,CostPerValue=1,StatType="HeadDamage",Progress=1,bHiddenConfig=true) DefPerkStats(19)=(MaxValue=500,CostPerValue=1,StatType="HeadDamage",Progress=1,bHiddenConfig=true)
DefPerkStats(20)=(MaxValue=200,CostPerValue=1,StatType="HealRecharge",Progress=0.5,bHiddenConfig=true) DefPerkStats(20)=(MaxValue=200,CostPerValue=1,StatType="HealRecharge",Progress=0.5,bHiddenConfig=true)
DefPerkStats(21)=(MaxValue=100,CostPerValue=1,StatType="Switch",Progress=1)
Modifiers.Add(1.f) Modifiers.Add(1.f)
Modifiers.Add(1.f) Modifiers.Add(1.f)
@ -1570,6 +1581,7 @@ defaultproperties
Modifiers.Add(1.f) Modifiers.Add(1.f)
Modifiers.Add(0.f) Modifiers.Add(0.f)
Modifiers.Add(1.f) Modifiers.Add(1.f)
Modifiers.Add(1.f)
EnemyDistDraw.Add(500) EnemyDistDraw.Add(500)
EnemyDistDraw.Add(700) EnemyDistDraw.Add(700)