subs/control: Fix to ignore embarked land units
Moving stuff out of an occupied sector generally requires "military control", i.e. you need at least one military for every ten civilians. Military in land units count. Even when the land unit is loaded on a ship or land unit. Questionable, because unload need not be possible. Checking whether unload would be possible is not worth the trouble here, simply ignore embarked land units. This affects commands move, explore, sell, set and transport, as well as the update's distribution and delivery. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
986df4e2ab
commit
19656b892b
1 changed files with 2 additions and 0 deletions
|
@ -85,6 +85,8 @@ military_control(struct sctstr *sp)
|
|||
if (sp->sct_oldown != sp->sct_own) {
|
||||
snxtitem_xy(&ni, EF_LAND, sp->sct_x, sp->sct_y);
|
||||
while (nxtitem(&ni, &land)) {
|
||||
if (land.lnd_ship >= 0 || land.lnd_land >= 0)
|
||||
continue;
|
||||
if (land.lnd_own == sp->sct_own)
|
||||
tot_mil += land.lnd_item[I_MILIT];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue