Merge pull request #35 from secretagentjr/weaponswitch

weaponswitch speed
This commit is contained in:
GenZmeY 2021-08-24 04:48:23 +03:00 committed by GitHub
commit b6386ff4f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -904,6 +904,13 @@ simulated function float GetTightChokeModifier()
return (CurrentPerk!=None ? CurrentPerk.GetTightChokeModifier() : 1.f);
}
// SwitchSpeed
simulated function ModifyWeaponSwitchTime(out float ModifiedSwitc)
{
if (CurrentPerk != None)
CurrentPerk.ModifyWeaponSwitchTime(ModifiedSwitchTime);
}
// Other
function ApplySkillsToPawn()
{

View File

@ -109,6 +109,7 @@ var localized string StatFireDmg;
var localized string StatAllDmg;
var localized string StatHeadDamage;
var localized string StatHealRecharge;
var localized string StatSwitch;
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("HeadDamage"): return StatHeadDamage;
case name("HealRecharge"): return StatHealRecharge;
case name("Switch"): return StatSwitch;
}
return "";
}
@ -710,6 +712,8 @@ static function UpdateConfigs(int OldVer)
AddStatsCfg(18); // Add all damage.
else if (OldVer<=13)
AddStatsCfg(19); // Add HeadDamage and HealRecharge
else if (OldVer<=14)
AddStatsCfg(21); // Add WeaponSwitch
if (OldVer<=5)
{
// Add prestige
@ -1237,6 +1241,9 @@ simulated function float ApplyEffect(name Type, float Value, float Progress)
case 'HealRecharge':
Modifiers[20] = 1.f / (1.f+Value*Progress);
break;
case 'Switch':
Modifiers[21] = 1.f / (1.f+Value*Progress);
break;
}
return (Value*Progress);
}
@ -1477,6 +1484,11 @@ simulated function float GetIronSightSpeedModifier(KFWeapon KFW)
return 1.f;
}
simulated function ModifyWeaponSwitchTime(out float ModifiedSwitchTime)
{
ModifiedSwitchTime *= Modifiers[21];
}
function OnWaveEnded();
function NotifyZedTimeStarted();
@ -1492,7 +1504,7 @@ simulated function float GetTightChokeModifier()
defaultproperties
{
CurrentConfigVer=14
CurrentConfigVer=15
bOnlyRelevantToOwner=true
bCanBeGrabbed=true
NetUpdateFrequency=1
@ -1563,6 +1575,7 @@ defaultproperties
DefPerkStats(18)=(MaxValue=500,CostPerValue=1,StatType="AllDmg",Progress=0.25)
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(21)=(MaxValue=100,CostPerValue=1,StatType="Switch",Progress=1)
Modifiers.Add(1.f)
Modifiers.Add(1.f)
@ -1585,6 +1598,7 @@ defaultproperties
Modifiers.Add(1.f)
Modifiers.Add(0.f)
Modifiers.Add(1.f)
Modifiers.Add(1.f)
EnemyDistDraw.Add(500)
EnemyDistDraw.Add(700)