From ed3324fb81ce429b475b26efd56d179beb454ea8 Mon Sep 17 00:00:00 2001 From: OBilo <54061981+Keshash@users.noreply.github.com> Date: Thu, 23 Jan 2025 19:59:05 +0200 Subject: [PATCH 1/2] Increase penalty for firing through smoke --- .../CombatExtended/Verbs/Verb_LaunchProjectileCE.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs b/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs index efa2cb69ab..0b082bc9bb 100644 --- a/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs +++ b/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs @@ -57,6 +57,8 @@ public class Verb_LaunchProjectileCE : Verb protected bool repeating = false; protected bool doRetarget = true; + protected const float smokePenaltyMultiplier = 4f; //increases penalty for shooting through smoke + #endregion #region Properties @@ -734,6 +736,8 @@ private bool GetHighestCoverAndSmokeForTarget(LocalTargetInfo target, out Thing if (cell.AnyGas(map, GasType.BlindSmoke)) { smokeDensity += GasUtility.BlindingGasAccuracyPenalty; + //increase the hardcoded vanilla blind smoke penalty + smokeDensity += GasUtility.BlindingGasAccuracyPenalty * smokePenaltyMultiplier; } if (!roofed) { From be0501b2747aaa07b3f0fdd4459cf6dca74e56bf Mon Sep 17 00:00:00 2001 From: OBilo <54061981+Keshash@users.noreply.github.com> Date: Tue, 4 Feb 2025 17:18:53 +0200 Subject: [PATCH 2/2] Remove accidental line of code --- .../CombatExtended/Verbs/Verb_LaunchProjectileCE.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs b/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs index 0b082bc9bb..a402e6319c 100644 --- a/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs +++ b/Source/CombatExtended/CombatExtended/Verbs/Verb_LaunchProjectileCE.cs @@ -735,7 +735,6 @@ private bool GetHighestCoverAndSmokeForTarget(LocalTargetInfo target, out Thing // TODO 1.4: Figure out how the new hardcoded gas system will work for our smoke and custom gases if (cell.AnyGas(map, GasType.BlindSmoke)) { - smokeDensity += GasUtility.BlindingGasAccuracyPenalty; //increase the hardcoded vanilla blind smoke penalty smokeDensity += GasUtility.BlindingGasAccuracyPenalty * smokePenaltyMultiplier; }