Merge pull request #44 from secretagentjr/master

Update Recoil / Spread to be flat reduction, capping out at 100%, allow knockback to go above 100%
This commit is contained in:
GenZmeY 2023-09-09 23:20:34 +03:00 committed by GitHub
commit 53b8933952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 147 additions and 6 deletions

Binary file not shown.

View File

@ -1171,10 +1171,10 @@ simulated function float ApplyEffect(name Type, float Value, float Progress)
Modifiers[1] = 1.f + (Value*Progress); Modifiers[1] = 1.f + (Value*Progress);
break; break;
case 'Recoil': case 'Recoil':
Modifiers[2] = 1.f / (1.f+Value*Progress); Modifiers[2] = 1.f - (Value*Progress);
break; break;
case 'Spread': case 'Spread':
Modifiers[3] = 1.f / (1.f+Value*Progress); Modifiers[3] = 1.f - (Value*Progress);
break; break;
case 'Rate': case 'Rate':
Modifiers[4] = 1.f / (1.f+Value*Progress); Modifiers[4] = 1.f / (1.f+Value*Progress);
@ -1191,8 +1191,8 @@ simulated function float ApplyEffect(name Type, float Value, float Progress)
} }
break; break;
case 'KnockDown': case 'KnockDown':
Modifiers[7] = FMin(1.f + (Value*Progress),2.f); Modifiers[7] = 1.f + (Value*Progress);
return (Modifiers[7]-1.f); break;
case 'Welder': case 'Welder':
Modifiers[8] = 1.f + (Value*Progress); Modifiers[8] = 1.f + (Value*Progress);
break; break;
@ -1556,8 +1556,8 @@ defaultproperties
DefPerkStats(0)=(MaxValue=50,CostPerValue=1,StatType="Speed",Progress=0.4) DefPerkStats(0)=(MaxValue=50,CostPerValue=1,StatType="Speed",Progress=0.4)
DefPerkStats(1)=(MaxValue=1000,CostPerValue=1,StatType="Damage",Progress=0.5) DefPerkStats(1)=(MaxValue=1000,CostPerValue=1,StatType="Damage",Progress=0.5)
DefPerkStats(2)=(MaxValue=90,CostPerValue=1,StatType="Recoil",Progress=1) DefPerkStats(2)=(MaxValue=100,CostPerValue=1,StatType="Recoil",Progress=1)
DefPerkStats(3)=(MaxValue=80,CostPerValue=1,StatType="Spread",Progress=0.75) DefPerkStats(3)=(MaxValue=100,CostPerValue=1,StatType="Spread",Progress=1)
DefPerkStats(4)=(MaxValue=1000,CostPerValue=1,StatType="Rate",Progress=0.5) DefPerkStats(4)=(MaxValue=1000,CostPerValue=1,StatType="Rate",Progress=0.5)
DefPerkStats(5)=(MaxValue=1000,CostPerValue=1,StatType="Reload",Progress=0.5) DefPerkStats(5)=(MaxValue=1000,CostPerValue=1,StatType="Reload",Progress=0.5)
DefPerkStats(6)=(MaxValue=150,CostPerValue=1,StatType="Health",Progress=1) DefPerkStats(6)=(MaxValue=150,CostPerValue=1,StatType="Health",Progress=1)

View File

@ -1,5 +1,48 @@
Class Ext_PerkFirebug extends Ext_PerkBase; Class Ext_PerkFirebug extends Ext_PerkBase;
var bool bUseInferno,bUsePyromaniac,bUseGroundFire,bUseHeatWave;
replication
{
// Things the server should send to the client.
if (true)
bUseInferno,bUsePyromaniac,bUseGroundFire,bUseHeatWave;
}
simulated final private function bool IsInfernoActive()
{
return bUseInferno && WorldInfo.TimeDilation < 1.f;
}
simulated function bool GetIsUberAmmoActive(KFWeapon KFW)
{
return bUsePyromaniac && IsWeaponOnPerk(KFW) && WorldInfo.TimeDilation < 1.f;
}
simulated function float GetZedTimeModifier(KFWeapon W)
{
local name StateName;
if (bUsePyromaniac && IsWeaponOnPerk(W))
{
StateName = W.GetStateName();
if (BasePerk.Default.ZedTimeModifyingStates.Find(StateName) != INDEX_NONE || StateName == 'Reloading')
return 1.f;
}
return 0.f;
}
simulated final private function bool IsGroundFireActive()
{
return bUseGroundFire;
}
simulated final private function bool IsHeatWaveActive()
{
return bUseHeatWave;
}
defaultproperties defaultproperties
{ {
PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Firebug' PerkIcon=Texture2D'UI_PerkIcons_TEX.UI_PerkIcon_Firebug'
@ -7,6 +50,10 @@ defaultproperties
DefTraitList.Add(class'Ext_TraitNapalm') DefTraitList.Add(class'Ext_TraitNapalm')
DefTraitList.Add(class'Ext_TraitFireExplode') DefTraitList.Add(class'Ext_TraitFireExplode')
DefTraitList.Add(class'Ext_TraitFireRange') DefTraitList.Add(class'Ext_TraitFireRange')
DefTraitList.Add(class'Ext_TraitInferno')
DefTraitList.Add(class'Ext_TraitPyromaniac')
DefTraitList.Add(class'Ext_TraitGroundFire')
DefTraitList.Add(class'Ext_TraitHeatWave')
BasePerk=class'KFPerk_Firebug' BasePerk=class'KFPerk_Firebug'
PrimaryMelee=class'KFWeap_Knife_Firebug' PrimaryMelee=class'KFWeap_Knife_Firebug'

View File

@ -0,0 +1,16 @@
Class Ext_TraitGroundFire extends Ext_TraitBase;
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFirebug(Perk).bUseGroundFire = true;
}
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFirebug(Perk).bUseGroundFire = false;
}
defaultproperties
{
DefLevelCosts(0)=50
}

View File

@ -0,0 +1,16 @@
Class Ext_TraitHeatWave extends Ext_TraitBase;
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFirebug(Perk).bUseHeatWave = true;
}
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFirebug(Perk).bUseHeatWave = false;
}
defaultproperties
{
DefLevelCosts(0)=50
}

View File

@ -0,0 +1,31 @@
Class Ext_TraitInferno extends Ext_TraitBase;
var localized string GroupDescription;
function string GetPerkDescription()
{
local string S;
S = Super.GetPerkDescription();
S $= "|"$GroupDescription;
return S;
}
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFirebug(Perk).bUseInferno = true;
}
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFirebug(Perk).bUseInferno = false;
}
defaultproperties
{
SupportedPerk=class'Ext_PerkFirebug'
TraitGroup=class'Ext_TGroupZEDTime'
NumLevels=1
DefLevelCosts(0)=50
//DefMinLevel=65
}

View File

@ -0,0 +1,31 @@
Class Ext_TraitPyromaniac extends Ext_TraitBase;
var localized string GroupDescription;
function string GetPerkDescription()
{
local string S;
S = Super.GetPerkDescription();
S $= "|"$GroupDescription;
return S;
}
static function TraitActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFirebug(Perk).bUsePyromaniac = true;
}
static function TraitDeActivate(Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data)
{
Ext_PerkFirebug(Perk).bUsePyromaniac = false;
}
defaultproperties
{
SupportedPerk=class'Ext_PerkFirebug'
TraitGroup=class'Ext_TGroupZEDTime'
NumLevels=1
DefLevelCosts(0)=50
//DefMinLevel=65
}