[Change] Target hostile no longet picks up disabled ships when targetting nearest hostile.
This commit is contained in:
parent
b55259321e
commit
7d04d86146
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user