From 5d9b21fd46378cecbe00cdb4088f4d2f1be8d3fe Mon Sep 17 00:00:00 2001 From: Cekis Date: Thu, 19 Jan 2017 00:03:43 +0000 Subject: [PATCH] Fixed issue where a ship hits another object that is dead, but it cannot stop combat with it because the hit object is not on the ships target list. --- .../compiled/game/script/space/ai/space_ai.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) mode change 100644 => 100755 sku.0/sys.server/compiled/game/script/space/ai/space_ai.java diff --git a/sku.0/sys.server/compiled/game/script/space/ai/space_ai.java b/sku.0/sys.server/compiled/game/script/space/ai/space_ai.java old mode 100644 new mode 100755 index 21ac744a5..536e796b6 --- a/sku.0/sys.server/compiled/game/script/space/ai/space_ai.java +++ b/sku.0/sys.server/compiled/game/script/space/ai/space_ai.java @@ -49,7 +49,14 @@ public class space_ai extends script.base_script { if (ship_ai.isShipDead(target)) { - ship_ai.spaceStopAttack(self, target); + // get my target list and only attempt to remove the target if it's on my list. + obj_id[] targetList = ship_ai.unitGetAttackTargetList(self); + for(obj_id listMember : targetList){ + if(listMember.equals(target)){ + ship_ai.spaceStopAttack(self, target); + break; + } + } } return SCRIPT_CONTINUE; }