diff --git a/Classes/ST_FlakSlug.uc b/Classes/ST_FlakSlug.uc index 0427ec5..e19d362 100644 --- a/Classes/ST_FlakSlug.uc +++ b/Classes/ST_FlakSlug.uc @@ -7,11 +7,35 @@ class ST_FlakSlug extends flakslug; var ST_Mutator STM; +var WeaponSettingsRepl WSettings; + +simulated final function WeaponSettingsRepl FindWeaponSettings() { + local WeaponSettingsRepl S; + + foreach AllActors(class'WeaponSettingsRepl', S) + return S; + + return none; +} + +simulated final function WeaponSettingsRepl GetWeaponSettings() { + if (WSettings != none) + return WSettings; + + WSettings = FindWeaponSettings(); + return WSettings; +} function ProcessTouch (Actor Other, vector HitLocation) { - if ( Other != instigator ) - NewExplode(HitLocation,Normal(HitLocation-Other.Location), Other.IsA('Pawn')); + + if (Other == Instigator) + return; + + if (Other.IsA('ShockProj') && GetWeaponSettings().ShockProjectileBlockFlakSlug == false) + return; // If ShockProjectileBlockFlakSlug is False, we do nothing and the flak slug passes through + + NewExplode(HitLocation, Normal(HitLocation-Other.Location), Other.IsA('Pawn')); } function NewExplode(vector HitLocation, vector HitNormal, bool bDirect) diff --git a/Classes/ST_UTChunk.uc b/Classes/ST_UTChunk.uc index c2bb72f..742dcd8 100644 --- a/Classes/ST_UTChunk.uc +++ b/Classes/ST_UTChunk.uc @@ -19,8 +19,8 @@ function ProcessTouch (Actor Other, vector HitLocation) if (Physics == PHYS_None) return; - // For ShockProjectileBlockFlak - if (ShockProj(Other) != None && Chunkie.STM.WeaponSettings.ShockProjectileBlockFlak) + // For ShockProjectileBlockFlakChunk + if (ShockProj(Other) != None && Chunkie.STM.WeaponSettings.ShockProjectileBlockFlakChunk) return; if ( (Chunk(Other) == None) && ((Physics == PHYS_Falling) || (Other != Instigator)) ) diff --git a/Classes/WeaponSettings.uc b/Classes/WeaponSettings.uc index d869fea..a314617 100644 --- a/Classes/WeaponSettings.uc +++ b/Classes/WeaponSettings.uc @@ -102,7 +102,8 @@ var config float ShockProjectileDamage; var config float ShockProjectileHurtRadius; var config float ShockProjectileMomentum; var config bool ShockProjectileBlockBullets; -var config bool ShockProjectileBlockFlak; +var config bool ShockProjectileBlockFlakChunk; +var config bool ShockProjectileBlockFlakSlug; var config bool ShockProjectileTakeDamage; var config bool ShockProjectileCompensatePing; var config float ShockProjectileHealth; @@ -258,7 +259,8 @@ defaultproperties ShockProjectileHurtRadius=70 ShockProjectileMomentum=1.0 ShockProjectileBlockBullets=True - ShockProjectileBlockFlak=True + ShockProjectileBlockFlakChunk=True + ShockProjectileBlockFlakSlug=True ShockProjectileTakeDamage=False ShockProjectileCompensatePing=False ShockProjectileHealth=30 diff --git a/Classes/WeaponSettingsRepl.uc b/Classes/WeaponSettingsRepl.uc index 442e491..fb50e71 100644 --- a/Classes/WeaponSettingsRepl.uc +++ b/Classes/WeaponSettingsRepl.uc @@ -75,7 +75,8 @@ var float ShockProjectileDamage; var float ShockProjectileHurtRadius; var float ShockProjectileMomentum; var bool ShockProjectileBlockBullets; -var bool ShockProjectileBlockFlak; +var bool ShockProjectileBlockFlakChunk; +var bool ShockProjectileBlockFlakSlug; var bool ShockProjectileTakeDamage; var bool ShockProjectileCompensatePing; var float ShockProjectileHealth; @@ -202,7 +203,8 @@ replication { ShockProjectileHurtRadius, ShockProjectileMomentum, ShockProjectileBlockBullets, - ShockProjectileBlockFlak, + ShockProjectileBlockFlakChunk, + ShockProjectileBlockFlakSlug, ShockProjectileTakeDamage, ShockProjectileCompensatePing, ShockProjectileHealth, @@ -528,7 +530,9 @@ function InitFromWeaponSettings(WeaponSettings S) { ShockProjectileHurtRadius = S.ShockProjectileHurtRadius; ShockProjectileMomentum = S.ShockProjectileMomentum; ShockProjectileBlockBullets = S.ShockProjectileBlockBullets; - ShockProjectileBlockFlak = S.ShockProjectileBlockFlak; + ShockProjectileBlockFlakChunk = S.ShockProjectileBlockFlakChunk; + ShockProjectileBlockFlakSlug = S.ShockProjectileBlockFlakSlug; + ShockProjectileTakeDamage = S.ShockProjectileTakeDamage; ShockProjectileCompensatePing = S.ShockProjectileCompensatePing; ShockProjectileHealth = S.ShockProjectileHealth; @@ -694,7 +698,8 @@ defaultproperties ShockProjectileHurtRadius=70 ShockProjectileMomentum=1.0 ShockProjectileBlockBullets=True - ShockProjectileBlockFlak=True + ShockProjectileBlockFlakChunk=True + ShockProjectileBlockFlakSlug=True ShockProjectileTakeDamage=False ShockProjectileCompensatePing=False ShockProjectileHealth=30