This commit is contained in:
2025-09-22 22:17:19 +08:00
parent d7a368855c
commit 58cccdc903
3 changed files with 7 additions and 8 deletions

Binary file not shown.

View File

@@ -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)
{

View File

@@ -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)
{