march: Require all land units to start in the same sector
The capability to march land units spread over several sectors is obscure and rarely useful. Accidental use is probably more frequent than intentional use. Issues: * Interactive prompts show only the leader's position, and give no clue that some land units are actually elsewhere. * Path finding is supported only when all marching land units are in the same sector. * In each step, the bmap is updated for the leader's radar. The bmap is not updated around other marching land units. Already odd when all units are in the leader's sector, and odder still when some are elsewhere. * Interdiction becomes rather complex. For each movement, every sector entered is interdicted independently. This means the same ship, land unit or plane can interdict multiple times. Interdiction order depends on the order the code examines land units. which the player can control. This is all pretty much undocumented. * Complicates the code and its maintenance. Multiplies the number of test cases needed to cover march. I feel we're better off without this feature. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
5d0faf7a88
commit
69c99a0f29
9 changed files with 54 additions and 81 deletions
|
@ -101,7 +101,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
|||
if (type == EF_SHIP)
|
||||
shp_nav(ulist, minmob, maxmob, together, player->cnum);
|
||||
else
|
||||
lnd_mar(ulist, minmob, maxmob, together, player->cnum);
|
||||
lnd_mar(ulist, minmob, maxmob, player->cnum);
|
||||
if (QEMPTY(ulist)) {
|
||||
pr("No %s left\n", type == EF_SHIP ? "ships" : "lands");
|
||||
return RET_OK;
|
||||
|
@ -128,7 +128,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
|||
if (type == EF_SHIP)
|
||||
shp_nav(ulist, minmob, maxmob, together, player->cnum);
|
||||
else
|
||||
lnd_mar(ulist, minmob, maxmob, together, player->cnum);
|
||||
lnd_mar(ulist, minmob, maxmob, player->cnum);
|
||||
if (QEMPTY(ulist)) {
|
||||
pr("No %s left\n", type == EF_SHIP ? "ships" : "lands");
|
||||
return RET_OK;
|
||||
|
@ -157,9 +157,7 @@ do_unit_move(struct emp_qelem *ulist, int *together,
|
|||
else {
|
||||
if (!moved && !lnd_abandon_askyn(ulist))
|
||||
return RET_FAIL;
|
||||
stopping |=
|
||||
lnd_mar_one_sector(ulist, dir, player->cnum,
|
||||
*together);
|
||||
stopping |= lnd_mar_one_sector(ulist, dir, player->cnum);
|
||||
}
|
||||
moved = 1;
|
||||
cp++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue