update16 #35

Merged
NikC- merged 11 commits from update16 into master 2024-11-27 20:00:56 +03:00
6 changed files with 28 additions and 16 deletions
Showing only changes of commit e1769e8048 - Show all commits

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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