logic fix for FOLLOW (if we are not following a ship, and cannot see the target unit, then exit).

This commit is contained in:
Enno Rehling 2014-08-08 18:18:17 +02:00
parent 8dd4b783b1
commit 45a16681c4
1 changed files with 2 additions and 2 deletions

View File

@ -2770,12 +2770,12 @@ void follow_unit(unit * u)
} }
if ((a || followship) && !fval(u, UFL_MOVED | UFL_NOTMOVING)) { if ((a || followship) && !fval(u, UFL_MOVED | UFL_NOTMOVING)) {
bool follow = false;
if (!followship) { if (!followship) {
u2 = a->data.v; u2 = a->data.v;
} }
bool follow = false;
if (!followship && (!u2 || (u2->region != r || !cansee(u->faction, r, u2, 0)))) { if (!u2 || (!followship && (u2->region != r || !cansee(u->faction, r, u2, 0)))) {
return; return;
} }