mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-09-12 23:45:12 -04:00
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.
This commit is contained in:
Regular → Executable
+8
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user