forked from github/server
logic fix for FOLLOW (if we are not following a ship, and cannot see the target unit, then exit).
This commit is contained in:
parent
8dd4b783b1
commit
45a16681c4
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue