Change enforcer's heavy rifles' balance via burst fire parameters

This patch dramatically reduces recoil on all guns and lets XMV850
accumulate way more damage that previously possible.
This commit is contained in:
Anton Tarasenko 2024-11-27 03:04:37 +07:00
parent b3b107c8ec
commit e1769e8048
6 changed files with 28 additions and 16 deletions

View File

@ -2,5 +2,6 @@ class NiceHeavyFire extends NiceFire;
defaultproperties
{
maxBonusContLenght=3
maxBonusContLenght = 3
aimingSpreadReductionCoefficient = 0.0
}

View File

@ -20,6 +20,7 @@ var() bool bSemiMustBurst;
var() int MaxBurstLength;
var() int burstShotsMade;
var bool bResetRecoil; // Set this flag to 'true' to disable recoil for the next shot; flag will be automatically reset to 'false' after that
var float aimingSpreadReductionCoefficient;
var bool zoomOutOnShot;
var bool bShouldBounce;
var bool bCausePain;
@ -487,7 +488,7 @@ simulated function HandleRecoil(float Rec)
KFW= KFWeapon(Weapon);
if (KFW.bAimingRifle)
{
Rec *= 0.5;
Rec *= aimingSpreadReductionCoefficient;
}
if (nicePawn.stationaryTime > 0.0 && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillHeavyStablePosition'))
{
@ -697,7 +698,8 @@ simulated function UpdateFireSpeed(){
ReloadAnimRate = default.ReloadAnimRate * fireSpeedMod;
}
// This function is called when next fire time needs to be updated
simulated function float UpdateNextFireTime(float fireTimeVar){
simulated function float UpdateNextFireTime(float fireTimeVar) {
local float usedFireRate;
local float burstSlowDown;
local NiceHumanPawn nicePawn;
local class<NiceVeterancyTypes> niceVet;
@ -705,11 +707,19 @@ simulated function float UpdateNextFireTime(float fireTimeVar){
if(nicePawn != none)
niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePawn.PlayerReplicationInfo);
fireTimeVar = FMax(fireTimeVar, Level.TimeSeconds);
usedFireRate = fireRate;
if (maxBonusContLenght > 1) {
if (currentContLenght <= maxBonusContLenght) {
usedFireRate *= 0.8 + 0.2 * (maxBonusContLenght - currentContLenght);
} else {
usedFireRate *= 0.8;
}
}
if(bFireOnRelease){
if(bIsFiring)
fireTimeVar += MaxHoldTime + FireRate;
fireTimeVar += MaxHoldTime + usedFireRate;
else
fireTimeVar = Level.TimeSeconds + FireRate;
fireTimeVar = Level.TimeSeconds + usedFireRate;
}
else{
if(currentContext.bIsBursting && GetBurstLength() > 1){
@ -720,10 +730,10 @@ simulated function float UpdateNextFireTime(float fireTimeVar){
burstSlowDown = 1.0;
else
burstSlowDown = 1.3;
fireTimeVar += FireRate * burstSlowDown;
fireTimeVar += usedFireRate * burstSlowDown;
}
else
fireTimeVar += FireRate;
fireTimeVar += usedFireRate;
fireTimeVar = FMax(fireTimeVar, Level.TimeSeconds);
}
return fireTimeVar;
@ -745,4 +755,5 @@ defaultproperties
spreadGainedPerShot=0
spreadLostPerSecond=0
RecoilVelocityScale = 0
aimingSpreadReductionCoefficient = 0.5
}

View File

@ -4,8 +4,8 @@ defaultproperties
ProjectileSpeed=48250.000000
FireAimedAnim="Fire"
RecoilRate=0.040000
maxVerticalRecoilAngle=550
maxHorizontalRecoilAngle=225
maxVerticalRecoilAngle=115
maxHorizontalRecoilAngle=0
ShellEjectClass=Class'ROEffects.KFShellEjectAK'
ShellEjectBoneName="Shell_eject"
bAccuracyBonusForSemiAuto=True

View File

@ -5,8 +5,8 @@ defaultproperties
contBonus=1.400000
FireAimedAnim="Fire_Iron"
RecoilRate=0.050000
maxVerticalRecoilAngle=400
maxHorizontalRecoilAngle=200
maxVerticalRecoilAngle=100
maxHorizontalRecoilAngle=0
ShellEjectClass=Class'ROEffects.KFShellEjectAK'
ShellEjectBoneName="Shell_eject"
bAccuracyBonusForSemiAuto=True

View File

@ -4,8 +4,8 @@ defaultproperties
ProjectileSpeed=46500.000000
FireAimedAnim="Iron_Idle"
RecoilRate=0.050000
maxVerticalRecoilAngle=300
maxHorizontalRecoilAngle=150
maxVerticalRecoilAngle=75
maxHorizontalRecoilAngle=0
ShellEjectClass=Class'ROEffects.KFShellEjectBullpup'
ShellEjectBoneName="Shell_eject"
bAccuracyBonusForSemiAuto=True

View File

@ -12,12 +12,12 @@ simulated function HandleRecoil(float Rec)
defaultproperties
{
ProjectileSpeed=42650.000000
maxBonusContLenght=5
maxBonusContLenght=10
contBonusReset=false
FireAimedAnim="FireLoop"
RecoilRate=0.040000
maxVerticalRecoilAngle=450
maxHorizontalRecoilAngle=225
maxVerticalRecoilAngle=25
maxHorizontalRecoilAngle=0
ShellEjectClass=Class'ROEffects.KFShellEjectSCAR'
ShellEjectBoneName="ejector"
FireSoundRef="HMG_S.XMV.XMV-Fire-1"