From 7d04d86146237ea2d7d47a0b2ac80d62410dc545 Mon Sep 17 00:00:00 2001
From: Allanis <allanis@saracraft.net>
Date: Sun, 24 Feb 2013 16:09:06 +0000
Subject: [PATCH] [Change] Target hostile no longet picks up disabled ships
 when targetting nearest hostile.

---
 src/pilot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pilot.c b/src/pilot.c
index 7fa595a..3942440 100644
--- a/src/pilot.c
+++ b/src/pilot.c
@@ -83,7 +83,7 @@ unsigned pilot_getHostile(void) {
   for(tp = PLAYER_ID, d = 0., i = 0; i < pilots; i++)
     if(pilot_isFlag(pilot_stack[i], PILOT_HOSTILE)) {
       td = vect_dist(&pilot_stack[i]->solid->pos, &player->solid->pos);
-      if((tp == PLAYER_ID) || (td < d)) {
+      if(!pilot_isDisabled(pilot_stack[i]) && ((tp == PLAYER_ID) || (td < d))) {
         d = td;
         tp = pilot_stack[i]->id;
       }