march: Fix 'm' not to leave engineer without mobility behind
When lnd_sweep() rejects an engineer for want of mobility, it removes it from the list of units. Can happen only when sweeping for march sub-command 'm'. Any engineer without mobility is dropped from the march immediately. Broken in Empire 2. Fix lnd_sweep() to handle this case just like the others, and like shp_sweep(): report and continue with the next list member. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
7787cae780
commit
b0221b9d2f
3 changed files with 6 additions and 4 deletions
|
@ -602,7 +602,8 @@ lnd_sweep(struct emp_qelem *land_list, int explicit, int takemob,
|
|||
}
|
||||
if (takemob && llp->mobil <= 0.0) {
|
||||
if (explicit)
|
||||
lnd_stays(actor, "is out of mobility", llp);
|
||||
mpr(actor, "%s is out of mobility!\n",
|
||||
prland(&llp->unit.land));
|
||||
continue;
|
||||
}
|
||||
getsect(llp->unit.land.lnd_x, llp->unit.land.lnd_y, §);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue