diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index 9ba058d..ee5ee1b 100644 Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ diff --git a/Source/ArachnaeSwarm/Buildings/Building_CatastropheMissileSilo.cs b/Source/ArachnaeSwarm/Buildings/Building_CatastropheMissileSilo.cs index 56d2c56..8a626db 100644 --- a/Source/ArachnaeSwarm/Buildings/Building_CatastropheMissileSilo.cs +++ b/Source/ArachnaeSwarm/Buildings/Building_CatastropheMissileSilo.cs @@ -37,6 +37,13 @@ namespace ArachnaeSwarm // Base tick handles all local targeting, cooldowns, and fuel consumption via XML. base.Tick(); + // --- Target Sanity Checks --- + // If we have a remote target, check if it's still valid. If not, stop targeting. + if (this.longTarget.HasThing && (this.longTarget.ThingDestroyed || !this.longTarget.Thing.Spawned)) + { + this.longTarget = GlobalTargetInfo.Invalid; + } + // If a local target is active, prevent remote targeting. if (this.forcedTarget.IsValid && this.longTarget.IsValid) { diff --git a/Source/ArachnaeSwarm/World/WorldObject_CatastropheMissile.cs b/Source/ArachnaeSwarm/World/WorldObject_CatastropheMissile.cs index 3a3205a..194a07c 100644 --- a/Source/ArachnaeSwarm/World/WorldObject_CatastropheMissile.cs +++ b/Source/ArachnaeSwarm/World/WorldObject_CatastropheMissile.cs @@ -68,14 +68,6 @@ namespace ArachnaeSwarm private void Arrived() { - // Safety check for invalid destination tile - if (destinationTile < 0) - { - Log.Error("CatastropheMissile cannot arrive at an invalid tile. Removing."); - Find.WorldObjects.Remove(this); - return; - } - Map targetMap = Current.Game.FindMap(this.destinationTile); if (targetMap != null) {