From a73a92263379d84cacffc83869e3f5fce7cc375d Mon Sep 17 00:00:00 2001 From: MaxDorob Date: Wed, 20 Sep 2023 00:49:26 +0600 Subject: [PATCH] Fixed global targeting for rocketswarm-like systems (that not able set forced target) --- .../CombatExtended/Things/Building_TurretGunCE.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs b/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs index 99bb02f5d3..85e76582d1 100644 --- a/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs +++ b/Source/CombatExtended/CombatExtended/Things/Building_TurretGunCE.cs @@ -314,7 +314,7 @@ public override void Tick() //Autoreload code and IsReloading check //This code runs TryOrderReload for manning pawns or for non-humanlike intelligence such as mechs /*if (this.IsHashIntervalTick(TicksBetweenAmmoChecks) && !isReloading && (MannableComp?.MannedNow ?? false)) TryOrderReload(CompAmmo?.CurMagCount == 0);*/ - if (!CanSetForcedTarget && !isReloading && forcedTarget.IsValid && burstCooldownTicksLeft <= 0) + if (!CanSetForcedTarget && !isReloading && forcedTarget.IsValid && !globalTargetInfo.IsValid && burstCooldownTicksLeft <= 0) { ResetForcedTarget(); }