]> git.pond.sub.org Git - empserver/commitdiff
(lnd_sweep, lnd_mar_one_sector): Automatic fortification on excess
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 28 Jan 2004 19:02:29 +0000 (19:02 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 28 Jan 2004 19:02:29 +0000 (19:02 +0000)
mobility may fortify units while they are `at the march prompt'.
That's okay.  But action that consumes mobility must zap the
fortification again.

src/lib/subs/lndsub.c

index 8799864c861aff8a36f8cb22672dcc194af3ba27..13f71a6674c1d5a1c4750cd5475a96bfe1397fde 100644 (file)
@@ -713,6 +713,7 @@ lnd_sweep(struct emp_qelem *land_list, int verbose, int takemob,
                               techfact(llp->land.lnd_tech, mobcost));
            llp->mobil -= mobcost;
            llp->land.lnd_mobil = (int)llp->mobil;
+           llp->land.lnd_harden = 0;
        }
        putland(llp->land.lnd_uid, &llp->land);
        if (!(mines = getvar(V_MINE, (s_char *)&sect, EF_SECTOR)))
@@ -1183,6 +1184,7 @@ lnd_mar_one_sector(struct emp_qelem *list, int dir, natid actor,
            llp->mobil -= lnd_mobcost(&llp->land, &sect, MOB_ROAD);
        }
        llp->land.lnd_mobil = (int)llp->mobil;
+       llp->land.lnd_harden = 0;
        putland(llp->land.lnd_uid, &llp->land);
        putsect(&osect);
        getsect(osect.sct_x, osect.sct_y, &osect);