let swimming and flying units follow a ship

This commit is contained in:
Enno Rehling 2020-08-12 01:22:07 +02:00
parent 05a200698a
commit b657873488
1 changed files with 7 additions and 5 deletions

View File

@ -2233,15 +2233,17 @@ int follow_ship(unit * u, order * ord)
if (fval(u, UFL_NOTMOVING)) {
return 0;
}
else if (!u->ship) {
if (!fval(u_race(u), RCF_FLY|RCF_SWIM)) {
if (!u->ship) {
cmistake(u, ord, 144, MSG_MOVE);
return 0;
}
else if (u != ship_owner(u->ship)) {
}
else if (u->ship && u != ship_owner(u->ship)) {
cmistake(u, ord, 146, MSG_MOVE);
return 0;
}
else if (!can_move(u)) {
if (!can_move(u)) {
cmistake(u, ord, 55, MSG_MOVE);
return 0;
}