subs: Don't hardcode impassable sector types

Check for d_mob0 < 0 instead, like we do elsewhere.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2014-12-28 19:06:16 +01:00
parent d89825116e
commit 7fa0334c25

View file

@ -975,11 +975,9 @@ lnd_mar_one_sector(struct emp_qelem *list, int dir, natid actor,
newy = ynorm(llp->unit.land.lnd_y + dy); newy = ynorm(llp->unit.land.lnd_y + dy);
getsect(newx, newy, &sect); getsect(newx, newy, &sect);
rel = relations_with(sect.sct_own, actor); rel = relations_with(sect.sct_own, actor);
if ((rel != ALLIED && if ((rel != ALLIED && sect.sct_own
!(lchr[(int)llp->unit.land.lnd_type].l_flags & L_SPY) && && !(lchr[llp->unit.land.lnd_type].l_flags & L_SPY))
sect.sct_own) || (sect.sct_type == SCT_WATER || || dchr[sect.sct_type].d_mob0 < 0) {
sect.sct_type == SCT_SANCT ||
sect.sct_type == SCT_WASTE)) {
if (together) { if (together) {
mpr(actor, "can't go to %s\n", xyas(newx, newy, actor)); mpr(actor, "can't go to %s\n", xyas(newx, newy, actor));
return 1; return 1;