(unit_put): New, create by combining shp_put() and lnd_put().

(sail_nav_fleet, shp_nav_one_sector): Replace shp_put() with unit_put().
(lnd_mar_one_sector, att_fight, move_in_land): Replace lnd_put() with unit_put().
(shp_put, lnd_put): Remove.
This commit is contained in:
Ron Koenderink 2007-01-23 23:51:02 +00:00
parent 038cc74d4e
commit d94d269769
8 changed files with 39 additions and 56 deletions

View file

@ -598,32 +598,6 @@ lnd_mar(struct emp_qelem *list, double *minmobp, double *maxmobp,
}
}
void
lnd_put(struct emp_qelem *list, natid actor)
{
struct emp_qelem *qp;
struct emp_qelem *newqp;
struct ulist *llp;
qp = list->q_back;
while (qp != list) {
llp = (struct ulist *)qp;
if (actor) {
mpr(actor, "%s stopped at %s\n", prland(&llp->unit.land),
xyas(llp->unit.land.lnd_x, llp->unit.land.lnd_y,
llp->unit.land.lnd_own));
if (llp->mobil < -127)
llp->mobil = -127;
llp->unit.land.lnd_mobil = llp->mobil;
}
putland(llp->unit.land.lnd_uid, &llp->unit.land);
newqp = qp->q_back;
emp_remque(qp);
free(qp);
qp = newqp;
}
}
void
lnd_sweep(struct emp_qelem *land_list, int verbose, int takemob,
natid actor)
@ -1014,7 +988,7 @@ lnd_mar_one_sector(struct emp_qelem *list, int dir, natid actor,
int oldown;
if (dir <= DIR_STOP || dir >= DIR_VIEW) {
lnd_put(list, actor);
unit_put(list, actor);
return 1;
}
dx = diroff[dir][0];