From 796b69982532f1f10d02b91358433d7d209ac38a Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:07:57 +0700 Subject: [PATCH 01/10] Add dynamic spread mechanic --- sources/Weapons/NiceFire.uc | 43 ++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/sources/Weapons/NiceFire.uc b/sources/Weapons/NiceFire.uc index a752d16..bc253e4 100644 --- a/sources/Weapons/NiceFire.uc +++ b/sources/Weapons/NiceFire.uc @@ -38,6 +38,10 @@ var bool projAffectedByScream; var bool bShouldStick; var int resetTicks; var float niceNextFireTime; +var float minimalSpreadScale; +var float activeSpreadScale; +var float spreadGainedPerShot; +var float spreadLostPerSecond; struct FireModeContext{ var bool bHipfire; var NiceWeapon sourceWeapon; @@ -152,9 +156,15 @@ simulated function int GetBurstLength(){ } return currentContext.burstLength; } + simulated function ModeTick(float delta){ local float headLevel; local NiceMonster currTarget; + if (spreadLostPerSecond > 0 && activeSpreadScale > minimalSpreadScale + && niceNextFireTime + fireRate <= Level.TimeSeconds) { + activeSpreadScale -= spreadLostPerSecond * delta; + activeSpreadScale = FMax(minimalSpreadScale, activeSpreadScale); + } if(currentContext.Instigator == none) currentContext.Instigator = NiceHumanPawn(Instigator); if(currentContext.sourceWeapon == none) @@ -548,7 +558,7 @@ function DoFireEffect(){ if(!Weapon.WeaponCentered() && !KFWeap.bAimingRifle) StartProj = StartProj + Weapon.Hand * Y * ProjSpawnOffset.Y + Z * ProjSpawnOffset.Z; other = Weapon.Trace(HitLocation, HitNormal, StartProj, StartTrace, false); - activeSpread = fireShots[currentShot].spread; + activeSpread = fireShots[currentShot].spread * activeSpreadScale; if(class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerBombard')){ bPinpoint = true; activeSpread *= class'NiceSkillEnforcerBombard'.default.spreadMult; @@ -607,6 +617,15 @@ function DoFireEffect(){ else if(Instigator.Physics == PHYS_Falling && Instigator.PhysicsVolume.Gravity.Z > class'PhysicsVolume'.default.Gravity.Z) Instigator.AddVelocity((KickMomentum * LowGravKickMomentumScale) >> Instigator.GetViewRotation()); } + if (activeSpreadScale < 1.0) { + if (KFWeap.bAimingRifle) { + activeSpreadScale += spreadGainedPerShot * 0.5; + } + else { + activeSpreadScale += spreadGainedPerShot; + } + activeSpreadScale = FMin(1.0, activeSpreadScale); + } } simulated function float TraceZed(out NiceMonster tracedZed, optional out Vector hitLoc, optional out Vector hitNorm, optional float hsMultiplier){ @@ -712,13 +731,17 @@ simulated function float UpdateNextFireTime(float fireTimeVar){ defaultproperties { - zedTimeFireSpeedUp=1.000000 - ProjPerFire=1 - ProjectileSpeed=1524.000000 - MaxBurstLength=3 - bulletClass=class'NiceBullet' - contBonus=1.200000 - contBonusReset=True - maxBonusContLenght=1 - AmmoPerFire=1 + zedTimeFireSpeedUp=1.000000 + ProjPerFire=1 + ProjectileSpeed=1524.000000 + MaxBurstLength=3 + bulletClass=class'NiceBullet' + contBonus=1.200000 + contBonusReset=True + maxBonusContLenght=1 + AmmoPerFire=1 + minimalSpreadScale=1 + activeSpreadScale=1 + spreadGainedPerShot=0 + spreadLostPerSecond=0 } From ed4d67dc1c2b0011968450aaf1c6a3112f56d4a3 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:10:59 +0700 Subject: [PATCH 02/10] Move medic SMGs to demolitionist perk --- sources/Perks/Commando/NiceDamTypeMedicDart.uc | 2 +- sources/Perks/Demolitions/NiceVetDemolitions.uc | 5 +++-- sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc | 2 +- sources/Weapons/Playable/SMG/Kriss/NiceKrissMPickup.uc | 2 +- sources/Weapons/Playable/SMG/M7A3/NiceDamTypeM7A3M.uc | 2 +- sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc | 2 +- sources/Weapons/Playable/SMG/MP5M/NiceDamTypeMP5M.uc | 2 +- sources/Weapons/Playable/SMG/MP5M/NiceMP5MPickup.uc | 2 +- sources/Weapons/Playable/SMG/MP7M/NiceDamTypeMP7M.uc | 2 +- sources/Weapons/Playable/SMG/MP7M/NiceMP7MPickup.uc | 2 +- 10 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sources/Perks/Commando/NiceDamTypeMedicDart.uc b/sources/Perks/Commando/NiceDamTypeMedicDart.uc index 260ac7a..c64ead0 100644 --- a/sources/Perks/Commando/NiceDamTypeMedicDart.uc +++ b/sources/Perks/Commando/NiceDamTypeMedicDart.uc @@ -1,4 +1,4 @@ -class NiceDamTypeMedicDart extends NiceDamageTypeVetCommando +class NiceDamTypeMedicDart extends NiceDamageTypeVetDemolitions abstract; defaultproperties { diff --git a/sources/Perks/Demolitions/NiceVetDemolitions.uc b/sources/Perks/Demolitions/NiceVetDemolitions.uc index a0c1006..ea36af8 100644 --- a/sources/Perks/Demolitions/NiceVetDemolitions.uc +++ b/sources/Perks/Demolitions/NiceVetDemolitions.uc @@ -39,12 +39,13 @@ static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured, perkDamage = float(InDamage); if(DmgType == class'NiceDamTypeDemoExplosion') return 1.6 * perkDamage; - if(IsPerkedPickup(pickupClass)) + if(IsPerkedPickup(pickupClass) && class(DmgType) != none) perkDamage *= 1.25; else if( pickupClass != none && pickupClass.default.weight <= class'NiceSkillDemoOffperk'.default.weightBound && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOffperk') ) perkDamage *= class'NiceSkillDemoOffperk'.default.damageBonus; - if( KFPRI != none && class(DmgType) != none + if( KFPRI != none && class(DmgType) == none + && IsPerkedPickup(pickupClass) && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillDemoOnperk') ) perkDamage *= class'NiceSkillDemoOnperk'.default.damageBonus; return perkDamage; diff --git a/sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc b/sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc index f728723..7516cbc 100644 --- a/sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc +++ b/sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc @@ -1,4 +1,4 @@ -class NiceDamTypeKrissM extends NiceDamageTypeVetCommando +class NiceDamTypeKrissM extends NiceDamageTypeVetDemolitions abstract; defaultproperties { diff --git a/sources/Weapons/Playable/SMG/Kriss/NiceKrissMPickup.uc b/sources/Weapons/Playable/SMG/Kriss/NiceKrissMPickup.uc index d8ec776..043b94d 100644 --- a/sources/Weapons/Playable/SMG/Kriss/NiceKrissMPickup.uc +++ b/sources/Weapons/Playable/SMG/Kriss/NiceKrissMPickup.uc @@ -17,7 +17,7 @@ defaultproperties AmmoItemName="45. ACP Ammo" AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' EquipmentCategoryID=3 - CorrespondingPerkIndex=3 + CorrespondingPerkIndex=6 InventoryType=class'NiceKrissMMedicGun' PickupMessage="You got the KRISS Vector Medic Gun" PickupSound=Sound'KF_KrissSND.Handling.KF_WEP_KRISS_Handling_Pickup' diff --git a/sources/Weapons/Playable/SMG/M7A3/NiceDamTypeM7A3M.uc b/sources/Weapons/Playable/SMG/M7A3/NiceDamTypeM7A3M.uc index e27b99e..96d8965 100644 --- a/sources/Weapons/Playable/SMG/M7A3/NiceDamTypeM7A3M.uc +++ b/sources/Weapons/Playable/SMG/M7A3/NiceDamTypeM7A3M.uc @@ -1,4 +1,4 @@ -class NiceDamTypeM7A3M extends NiceDamageTypeVetCommando +class NiceDamTypeM7A3M extends NiceDamageTypeVetDemolitions abstract; defaultproperties { diff --git a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc index 3454139..c75dd32 100644 --- a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc +++ b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc @@ -14,7 +14,7 @@ defaultproperties AmmoItemName="7.6x40mm Ammo" AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' EquipmentCategoryID=3 - CorrespondingPerkIndex=3 + CorrespondingPerkIndex=6 InventoryType=class'NiceM7A3MMedicGun' PickupMessage="You got the M7A3 Medic Gun" PickupSound=Sound'KF_M7A3Snd.M7A3_Pickup' diff --git a/sources/Weapons/Playable/SMG/MP5M/NiceDamTypeMP5M.uc b/sources/Weapons/Playable/SMG/MP5M/NiceDamTypeMP5M.uc index 3af2db7..ee30a1f 100644 --- a/sources/Weapons/Playable/SMG/MP5M/NiceDamTypeMP5M.uc +++ b/sources/Weapons/Playable/SMG/MP5M/NiceDamTypeMP5M.uc @@ -1,4 +1,4 @@ -class NiceDamTypeMP5M extends NiceDamageTypeVetCommando +class NiceDamTypeMP5M extends NiceDamageTypeVetDemolitions abstract; defaultproperties { diff --git a/sources/Weapons/Playable/SMG/MP5M/NiceMP5MPickup.uc b/sources/Weapons/Playable/SMG/MP5M/NiceMP5MPickup.uc index 39f5464..dbd1e37 100644 --- a/sources/Weapons/Playable/SMG/MP5M/NiceMP5MPickup.uc +++ b/sources/Weapons/Playable/SMG/MP5M/NiceMP5MPickup.uc @@ -14,7 +14,7 @@ defaultproperties AmmoItemName="9x19mm Ammo" AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' EquipmentCategoryID=3 - CorrespondingPerkIndex=3 + CorrespondingPerkIndex=6 VariantClasses(0)=Class'KFMod.CamoMP5MPickup' InventoryType=class'NiceMP5MMedicGun' PickupMessage="You got the MP5M Medic Gun" diff --git a/sources/Weapons/Playable/SMG/MP7M/NiceDamTypeMP7M.uc b/sources/Weapons/Playable/SMG/MP7M/NiceDamTypeMP7M.uc index 1076d20..71c97c6 100644 --- a/sources/Weapons/Playable/SMG/MP7M/NiceDamTypeMP7M.uc +++ b/sources/Weapons/Playable/SMG/MP7M/NiceDamTypeMP7M.uc @@ -1,4 +1,4 @@ -class NiceDamTypeMP7M extends NiceDamageTypeVetCommando +class NiceDamTypeMP7M extends NiceDamageTypeVetDemolitions abstract; defaultproperties { diff --git a/sources/Weapons/Playable/SMG/MP7M/NiceMP7MPickup.uc b/sources/Weapons/Playable/SMG/MP7M/NiceMP7MPickup.uc index 95104e2..cf4f30b 100644 --- a/sources/Weapons/Playable/SMG/MP7M/NiceMP7MPickup.uc +++ b/sources/Weapons/Playable/SMG/MP7M/NiceMP7MPickup.uc @@ -15,7 +15,7 @@ defaultproperties AmmoItemName="4.6x30mm Ammo" AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' EquipmentCategoryID=3 - CorrespondingPerkIndex=3 + CorrespondingPerkIndex=6 InventoryType=class'NiceMP7MMedicGun' PickupMessage="You got the MP7M Medic Gun" PickupSound=Sound'KF_MP7Snd.MP7_Pickup' From 879dedcd7dedb0b79439d3e1bfd0a5e8b69ec6e7 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:11:49 +0700 Subject: [PATCH 03/10] Add dynamic spread to SMGs --- sources/Weapons/Playable/SMG/Kriss/NiceKrissMFire.uc | 4 ++++ sources/Weapons/Playable/SMG/M7A3/NiceM7A3MFire.uc | 4 ++++ sources/Weapons/Playable/SMG/MP5M/NiceMP5MFire.uc | 4 ++++ sources/Weapons/Playable/SMG/MP7M/NiceMP7MFire.uc | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/sources/Weapons/Playable/SMG/Kriss/NiceKrissMFire.uc b/sources/Weapons/Playable/SMG/Kriss/NiceKrissMFire.uc index e47aedf..8502921 100644 --- a/sources/Weapons/Playable/SMG/Kriss/NiceKrissMFire.uc +++ b/sources/Weapons/Playable/SMG/Kriss/NiceKrissMFire.uc @@ -27,4 +27,8 @@ defaultproperties FlashEmitterClass=Class'ROEffects.MuzzleFlash1stMP' Spread=500.0 SpreadStyle=SS_Random + minimalSpreadScale=0.0 + activeSpreadScale=0.0 + spreadGainedPerShot=0.125 + spreadLostPerSecond=0.5 } diff --git a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MFire.uc b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MFire.uc index 0376bf8..f8d867b 100644 --- a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MFire.uc +++ b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MFire.uc @@ -34,4 +34,8 @@ defaultproperties aimerror=42.000000 Spread=500.0 SpreadStyle=SS_Random + minimalSpreadScale=0.0 + activeSpreadScale=0.0 + spreadGainedPerShot=0.25 + spreadLostPerSecond=0.5 } diff --git a/sources/Weapons/Playable/SMG/MP5M/NiceMP5MFire.uc b/sources/Weapons/Playable/SMG/MP5M/NiceMP5MFire.uc index ab4be61..1c3dd73 100644 --- a/sources/Weapons/Playable/SMG/MP5M/NiceMP5MFire.uc +++ b/sources/Weapons/Playable/SMG/MP5M/NiceMP5MFire.uc @@ -17,6 +17,10 @@ defaultproperties DamageMax=35 Spread=500.0 SpreadStyle=SS_Random + minimalSpreadScale=0.0 + activeSpreadScale=0.0 + spreadGainedPerShot=0.25 + spreadLostPerSecond=1.0 Momentum=5500.000000 FireRate=0.075000 AmmoClass=class'NiceMP5MAmmo' diff --git a/sources/Weapons/Playable/SMG/MP7M/NiceMP7MFire.uc b/sources/Weapons/Playable/SMG/MP7M/NiceMP7MFire.uc index 9806704..073c332 100644 --- a/sources/Weapons/Playable/SMG/MP7M/NiceMP7MFire.uc +++ b/sources/Weapons/Playable/SMG/MP7M/NiceMP7MFire.uc @@ -27,4 +27,8 @@ defaultproperties FlashEmitterClass=Class'ROEffects.MuzzleFlash1stMP' Spread=500.0 SpreadStyle=SS_Random + minimalSpreadScale=0.0 + activeSpreadScale=0.0 + spreadGainedPerShot=0.1 + spreadLostPerSecond=0.5 } From 4d50763bc359d6d9895141937bc6db86eda881b8 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:12:23 +0700 Subject: [PATCH 04/10] Fix some of the commando ammo cost discrepancies --- sources/Perks/Commando/NiceVetCommando.uc | 10 ++++++++++ .../Playable/AssaultRifles/AK12/NiceAK12Pickup.uc | 2 +- .../Playable/AssaultRifles/AK47/NiceAK47Pickup.uc | 2 +- .../Playable/AssaultRifles/MKb42/NiceMKb42Pickup.uc | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sources/Perks/Commando/NiceVetCommando.uc b/sources/Perks/Commando/NiceVetCommando.uc index db16fbc..b0f1658 100644 --- a/sources/Perks/Commando/NiceVetCommando.uc +++ b/sources/Perks/Commando/NiceVetCommando.uc @@ -35,6 +35,16 @@ static function float GetMagCapacityMod(KFPlayerReplicationInfo KFPRI, KFWeapon return class'NiceSkillCommandoLargerMags'.default.sizeBonus; return 1.0; } +// Change the cost of particular ammo +static function float GetAmmoCostScaling(KFPlayerReplicationInfo KFPRI, class Item) +{ + local class pickupClass; + pickupClass = class(Item); + if(IsPerkedPickup(pickupClass) && HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoLargerMags')) { + return class'NiceSkillCommandoLargerMags'.default.sizeBonus; + } + return 1.0; +} static function float GetSyringeChargeRate(KFPlayerReplicationInfo KFPRI){ return 1.5; } diff --git a/sources/Weapons/Playable/AssaultRifles/AK12/NiceAK12Pickup.uc b/sources/Weapons/Playable/AssaultRifles/AK12/NiceAK12Pickup.uc index a9379e2..d910bd9 100644 --- a/sources/Weapons/Playable/AssaultRifles/AK12/NiceAK12Pickup.uc +++ b/sources/Weapons/Playable/AssaultRifles/AK12/NiceAK12Pickup.uc @@ -3,7 +3,7 @@ defaultproperties { Weight=6.000000 cost=750 - AmmoCost=19 + AmmoCost=25 BuyClipSize=40 PowerValue=55 SpeedValue=80 diff --git a/sources/Weapons/Playable/AssaultRifles/AK47/NiceAK47Pickup.uc b/sources/Weapons/Playable/AssaultRifles/AK47/NiceAK47Pickup.uc index db19d61..6dad7d2 100644 --- a/sources/Weapons/Playable/AssaultRifles/AK47/NiceAK47Pickup.uc +++ b/sources/Weapons/Playable/AssaultRifles/AK47/NiceAK47Pickup.uc @@ -3,7 +3,7 @@ defaultproperties { Weight=6.000000 cost=750 - AmmoCost=19 + AmmoCost=26 BuyClipSize=30 PowerValue=40 SpeedValue=80 diff --git a/sources/Weapons/Playable/AssaultRifles/MKb42/NiceMKb42Pickup.uc b/sources/Weapons/Playable/AssaultRifles/MKb42/NiceMKb42Pickup.uc index c97c589..01e2aa8 100644 --- a/sources/Weapons/Playable/AssaultRifles/MKb42/NiceMKb42Pickup.uc +++ b/sources/Weapons/Playable/AssaultRifles/MKb42/NiceMKb42Pickup.uc @@ -3,7 +3,7 @@ defaultproperties { Weight=6.000000 cost=750 - AmmoCost=22 + AmmoCost=19 BuyClipSize=30 PowerValue=40 SpeedValue=85 From bb8a28337861a0ed94843e8016f977d6edbdbf16 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:13:21 +0700 Subject: [PATCH 05/10] Decrease M41A grenade cost --- sources/Weapons/Playable/Heavy/M41A/NiceM41APickup.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/Weapons/Playable/Heavy/M41A/NiceM41APickup.uc b/sources/Weapons/Playable/Heavy/M41A/NiceM41APickup.uc index 610f503..e4df249 100644 --- a/sources/Weapons/Playable/Heavy/M41A/NiceM41APickup.uc +++ b/sources/Weapons/Playable/Heavy/M41A/NiceM41APickup.uc @@ -3,7 +3,7 @@ class NiceM41APickup extends NiceM41APrimaryPickup; defaultproperties { crossPerkIndecies(0)=6 - AmmoCost=60 + AmmoCost=12 BuyClipSize=1 SecondaryAmmoShortName="M41A Frag Grenades" PrimaryWeaponPickup=class'NiceM41APrimaryPickup' From 0e825e2111b1fc31104913a1498721fa0ef48205 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:14:29 +0700 Subject: [PATCH 06/10] Fix SMGs cost and amount values --- sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmo.uc | 4 ++-- sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmoPickup.uc | 2 +- sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmo.uc b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmo.uc index 0eda0d3..e900e0c 100644 --- a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmo.uc +++ b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmo.uc @@ -3,8 +3,8 @@ defaultproperties { WeaponPickupClass=class'NiceM7A3MPickup' AmmoPickupAmount=30 - MaxAmmo=180 - InitialAmount=45 + MaxAmmo=160 + InitialAmount=40 PickupClass=class'NiceM7A3MAmmoPickup' IconMaterial=Texture'KillingFloorHUD.Generic.HUD' IconCoords=(X1=336,Y1=82,X2=382,Y2=125) diff --git a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmoPickup.uc b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmoPickup.uc index 0f8acfc..220b8fb 100644 --- a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmoPickup.uc +++ b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MAmmoPickup.uc @@ -1,7 +1,7 @@ class NiceM7A3MAmmoPickup extends NiceAmmoPickup; defaultproperties { - AmmoAmount=15 + AmmoAmount=30 InventoryType=class'NiceM7A3MAmmo' PickupMessage="Rounds 7.6x40mm" StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo' diff --git a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc index c75dd32..826c735 100644 --- a/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc +++ b/sources/Weapons/Playable/SMG/M7A3/NiceM7A3MPickup.uc @@ -3,7 +3,7 @@ defaultproperties { Weight=5.000000 cost=1250 - AmmoCost=33 + AmmoCost=50 BuyClipSize=30 PowerValue=45 SpeedValue=60 From 8fb84b9695ed4ff1595a898531084a28d5a58b46 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:14:50 +0700 Subject: [PATCH 07/10] Fix Kriss' headshot damage multiplier --- sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc b/sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc index 7516cbc..ecb840b 100644 --- a/sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc +++ b/sources/Weapons/Playable/SMG/Kriss/NiceDamTypeKrissM.uc @@ -2,5 +2,6 @@ class NiceDamTypeKrissM extends NiceDamageTypeVetDemolitions abstract; defaultproperties { + HeadShotDamageMult=2.000000 WeaponClass=class'NiceKrissMMedicGun' } From 8ae4dac5284276e5d6da52c2dd485d3e79e9b2ab Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:15:13 +0700 Subject: [PATCH 08/10] Buff nailgun --- sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGun.uc | 2 +- .../Weapons/Playable/Shotguns/Nailgun/NiceNailGunAltFire.uc | 3 +++ .../Weapons/Playable/Shotguns/Nailgun/NiceNailGunAmmo.uc | 4 ++-- .../Weapons/Playable/Shotguns/Nailgun/NiceNailGunFire.uc | 6 +++--- .../Weapons/Playable/Shotguns/Nailgun/NiceNailGunPickup.uc | 2 +- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGun.uc b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGun.uc index b7d85ae..6eaf758 100644 --- a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGun.uc +++ b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGun.uc @@ -10,7 +10,7 @@ defaultproperties reloadMagStartFrame=0.278000 reloadChargeStartFrame=-1.000000 FirstPersonFlashlightOffset=(X=-20.000000,Y=-22.000000,Z=8.000000) - MagCapacity=28 + MagCapacity=42 ReloadRate=2.600000 ReloadAnim="Reload" ReloadAnimRate=1.000000 diff --git a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunAltFire.uc b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunAltFire.uc index 5650ed5..059a239 100644 --- a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunAltFire.uc +++ b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunAltFire.uc @@ -3,6 +3,9 @@ defaultproperties { bCanFireIncomplete=True ProjectileSpeed=3500.000000 + maxVerticalRecoilAngle=1250 + maxHorizontalRecoilAngle=750 + FireRate=0.600000 DamageType=class'NiceDamTypeNailGunWeak' AmmoPerFire=7 SpreadStyle=SS_Random diff --git a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunAmmo.uc b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunAmmo.uc index a005df5..6c7fbd8 100644 --- a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunAmmo.uc +++ b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunAmmo.uc @@ -3,8 +3,8 @@ class NiceNailGunAmmo extends NiceAmmo; defaultproperties { WeaponPickupClass=class'NiceNailGunPickup' - AmmoPickupAmount=28 - MaxAmmo=168 + AmmoPickupAmount=42 + MaxAmmo=336 InitialAmount=84 IconMaterial=Texture'KillingFloorHUD.Generic.HUD' IconCoords=(X1=451,Y1=445,X2=510,Y2=500) diff --git a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunFire.uc b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunFire.uc index f812f62..969bcdf 100644 --- a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunFire.uc +++ b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunFire.uc @@ -10,8 +10,8 @@ defaultproperties bShouldBounce=True bCausePain=True bulletClass=class'NiceNail' - maxVerticalRecoilAngle=1250 - maxHorizontalRecoilAngle=750 + maxVerticalRecoilAngle=0 + maxHorizontalRecoilAngle=0 bRandomPitchFireSound=True FireSoundRef="KF_NailShotgun.NailShotgun_Fire_Single_M" StereoFireSoundRef="KF_NailShotgun.NailShotgun_Fire_Single_S" @@ -19,7 +19,7 @@ defaultproperties DamageType=class'NiceDamTypeNailGun' DamageMax=66 FireAnimRate=1.250000 - FireRate=0.400000 + FireRate=0.300000 AmmoClass=class'NiceNailGunAmmo' ShakeRotTime=3.000000 ShakeOffsetTime=2.000000 diff --git a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunPickup.uc b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunPickup.uc index fc10888..44efb17 100644 --- a/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunPickup.uc +++ b/sources/Weapons/Playable/Shotguns/Nailgun/NiceNailGunPickup.uc @@ -4,7 +4,7 @@ defaultproperties Weight=8.000000 cost=250 AmmoCost=17 - BuyClipSize=28 + BuyClipSize=42 PowerValue=70 SpeedValue=55 RangeValue=25 From bc5774f3d63d6872b1c9b1f7430838718482aa15 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:15:30 +0700 Subject: [PATCH 09/10] Fix hunting rifle ammo cost --- .../SniperWeapons/HuntingRifle/NiceHuntingRiflePickup.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/Weapons/Playable/SniperWeapons/HuntingRifle/NiceHuntingRiflePickup.uc b/sources/Weapons/Playable/SniperWeapons/HuntingRifle/NiceHuntingRiflePickup.uc index 555932b..55477da 100644 --- a/sources/Weapons/Playable/SniperWeapons/HuntingRifle/NiceHuntingRiflePickup.uc +++ b/sources/Weapons/Playable/SniperWeapons/HuntingRifle/NiceHuntingRiflePickup.uc @@ -6,7 +6,7 @@ defaultproperties { Weight=6.000000 cost=750 - AmmoCost=34 + AmmoCost=22 BuyClipSize=5 PowerValue=55 SpeedValue=42 From 8f1f36972b03f26f8bda6ea3ab1ab094f4f8006a Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sat, 16 Mar 2024 16:15:56 +0700 Subject: [PATCH 10/10] Add some variables for zeds' speed modifications --- sources/Zeds/NiceMonster.uc | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/sources/Zeds/NiceMonster.uc b/sources/Zeds/NiceMonster.uc index 04bb11d..85b79d9 100644 --- a/sources/Zeds/NiceMonster.uc +++ b/sources/Zeds/NiceMonster.uc @@ -139,6 +139,25 @@ var float lastHeatTick; // resulting in a loss of potential damage var bool bFrugalFuelUsage; +//============================================================================== +//============================================================================== +// > Speed system +// Manages speed modifications from weapon attacks and other effects. +// +// This variable stores with how much stopping power zed was affected. +// Is a value from 0.0 to 1.0 and `1 - stoppingEffect` acts as speed multiplier +// for the zed +var float stoppingEffect; +// (Absolute) Point in time at which recovery would start, updated when zeds +// receives another stopping effect from somewhere +var float stoppingRecoveryStartTime; +// How much stopping effect would be rcovred in a second +var float stoppingRecoveryRate; +// Maximum stopping effect this zed can tank +var float maxStoppingEffect; +// Minimal stopping threshold for the zed (supposed to be subtracted from +// incoming effects' strenght). +var float minStoppingThreshold; //============================================================================== //============================================================================== // > Miscellaneous variables @@ -1570,13 +1589,13 @@ function Freeze(){ StopMovement(); Disable('AnimEnd'); StopAnimating(); - + if(Controller != none){ Controller.FocalPoint = Location + 512*vector(Rotation); Controller.Enemy = none; Controller.Focus = none; if(!Controller.IsInState('Freeze')) - Controller.GoToState('Freeze'); + Controller.GoToState('Freeze'); KFMonsterController(Controller).bUseFreezeHack = true; } bFrozenZed = true; @@ -2216,7 +2235,11 @@ defaultproperties DamageToMonsterScale=5.000000 RagdollLifeSpan=120.000000 ControllerClass=class'NiceMonsterController' - + stoppingEffect=0.0 + stoppingRecoveryStartTime=2.0 + stoppingRecoveryRate=0.5 + maxStoppingEffect=0.5 + minStoppingThreshold=0.0 Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN KConvulseSpacing=(Max=2.200000) KLinearDamping=0.150000