From 6cbc9508540b02d684dbbdc02916e7699de995bd Mon Sep 17 00:00:00 2001 From: w0ss4g3 <97363958+w0ss4g3@users.noreply.github.com> Date: Thu, 25 Jul 2024 18:42:03 +0100 Subject: [PATCH] Changed EnhancedSplash so that it can be controlled for each weapon. (#26) Authored-by: w0ss4g3 Added settings to control each weapon. Made default settings to only enable enhanced splash for ripper, flak and rockets. --- Classes/ST_FlakSlug.uc | 2 +- Classes/ST_Razor2Alt.uc | 2 +- Classes/ST_RocketMk2.uc | 2 +- Classes/ST_ShockProj.uc | 4 ++-- Classes/ST_UT_Grenade.uc | 2 +- Classes/ST_UT_SeekingRocket.uc | 2 +- Classes/WeaponSettings.uc | 14 ++++++++++---- 7 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Classes/ST_FlakSlug.uc b/Classes/ST_FlakSlug.uc index 4d7acc1..0427ec5 100644 --- a/Classes/ST_FlakSlug.uc +++ b/Classes/ST_FlakSlug.uc @@ -19,7 +19,7 @@ function NewExplode(vector HitLocation, vector HitNormal, bool bDirect) local vector start; local ST_UTChunkInfo CI; - if (STM.WeaponSettings.bEnableEnhancedSplash) { + if (STM.WeaponSettings.bEnableEnhancedSplashFlakSlug) { STM.EnhancedHurtRadius( self, STM.WeaponSettings.FlakSlugDamage, diff --git a/Classes/ST_Razor2Alt.uc b/Classes/ST_Razor2Alt.uc index 841131a..5bb40aa 100644 --- a/Classes/ST_Razor2Alt.uc +++ b/Classes/ST_Razor2Alt.uc @@ -53,7 +53,7 @@ auto state Flying local float damageScale, dist; local vector dir; - if (STM.WeaponSettings.bEnableEnhancedSplash) { + if (STM.WeaponSettings.bEnableEnhancedSplashRipperSecondary) { STM.EnhancedHurtRadius( self, STM.WeaponSettings.RipperSecondaryDamage, diff --git a/Classes/ST_RocketMk2.uc b/Classes/ST_RocketMk2.uc index e33b733..a561cef 100644 --- a/Classes/ST_RocketMk2.uc +++ b/Classes/ST_RocketMk2.uc @@ -52,7 +52,7 @@ auto state Flying function BlowUp(vector HitLocation) { - if (STM.WeaponSettings.bEnableEnhancedSplash) { + if (STM.WeaponSettings.bEnableEnhancedSplashRockets) { STM.EnhancedHurtRadius( self, STM.WeaponSettings.RocketDamage, diff --git a/Classes/ST_ShockProj.uc b/Classes/ST_ShockProj.uc index 5322e7e..103885a 100644 --- a/Classes/ST_ShockProj.uc +++ b/Classes/ST_ShockProj.uc @@ -17,7 +17,7 @@ simulated function PostBeginPlay() { } function SuperExplosion() { - if (STM.WeaponSettings.bEnableEnhancedSplashCombo) { + if (STM.WeaponSettings.bEnableEnhancedSplashShockCombo) { STM.EnhancedHurtRadius( self, STM.WeaponSettings.ShockComboDamage, @@ -42,7 +42,7 @@ function SuperExplosion() { function Explode(vector HitLocation,vector HitNormal) { PlaySound(ImpactSound, SLOT_Misc, 0.5,,, 0.5+FRand()); - if (STM.WeaponSettings.bEnableEnhancedSplash) { + if (STM.WeaponSettings.bEnableEnhancedSplashShockProjectile) { STM.EnhancedHurtRadius( self, STM.WeaponSettings.ShockProjectileDamage, diff --git a/Classes/ST_UT_Grenade.uc b/Classes/ST_UT_Grenade.uc index f937f1a..d36e58e 100644 --- a/Classes/ST_UT_Grenade.uc +++ b/Classes/ST_UT_Grenade.uc @@ -28,7 +28,7 @@ function Explosion(vector HitLocation) function BlowUp(vector HitLocation) { - if (STM.WeaponSettings.bEnableEnhancedSplash) { + if (STM.WeaponSettings.bEnableEnhancedSplashRockets) { STM.EnhancedHurtRadius( self, STM.WeaponSettings.GrenadeDamage, diff --git a/Classes/ST_UT_SeekingRocket.uc b/Classes/ST_UT_SeekingRocket.uc index a6955d2..0088aca 100644 --- a/Classes/ST_UT_SeekingRocket.uc +++ b/Classes/ST_UT_SeekingRocket.uc @@ -51,7 +51,7 @@ auto state Flying function BlowUp(vector HitLocation) { - if (STM.WeaponSettings.bEnableEnhancedSplash) { + if (STM.WeaponSettings.bEnableEnhancedSplashRockets) { STM.EnhancedHurtRadius( self, STM.WeaponSettings.RocketDamage, diff --git a/Classes/WeaponSettings.uc b/Classes/WeaponSettings.uc index 45f806b..112bdec 100644 --- a/Classes/WeaponSettings.uc +++ b/Classes/WeaponSettings.uc @@ -14,9 +14,12 @@ var config bool bReplaceRocketLauncher; var config bool bReplaceSniperRifle; var config bool bReplaceWarheadLauncher; -var config bool bEnableEnhancedSplash; var config bool bEnableEnhancedSplashBio; -var config bool bEnableEnhancedSplashCombo; +var config bool bEnableEnhancedSplashShockCombo; +var config bool bEnableEnhancedSplashShockProjectile; +var config bool bEnableEnhancedSplashRipperSecondary; +var config bool bEnableEnhancedSplashFlakSlug; +var config bool bEnableEnhancedSplashRockets; var config bool bEnhancedSplashIgnoreStationaryPawns; var config float SplashMaxDiffraction; var config float SplashMinDiffractionDistance; @@ -164,9 +167,12 @@ defaultproperties bReplaceSniperRifle=True bReplaceWarheadLauncher=True - bEnableEnhancedSplash=True bEnableEnhancedSplashBio=False - bEnableEnhancedSplashCombo=False + bEnableEnhancedSplashShockCombo=False + bEnableEnhancedSplashShockProjectile=False + bEnableEnhancedSplashRipperSecondary=True + bEnableEnhancedSplashFlakSlug=True + bEnableEnhancedSplashRockets=True SplashMaxDiffraction=0.5 SplashMinDiffractionDistance=50.0