]> git.pond.sub.org Git - empserver/commitdiff
convert: Drop broken code to charge security unit mobility
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 1 Feb 2015 16:48:58 +0000 (17:48 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 2 Mar 2015 07:20:51 +0000 (08:20 +0100)
Conversion is easier when land units with capability security are
present.  Each such land unit is charged 10 mobility.  The mobility
charge is undocumented.

Land unit mobility is charged even when conversion turns out to be
impossible, say because the sector has no mobility.  I call this a
bug.  Has been that way since security land units were added in
Chainsaw 3.

Except the mobility charge doesn't actually work anymore: the changed
land unit is never written back.  Broken in commit 82c9166, v4.3.16.
Fix this bug would be trivial, but would bring back the bug described
above, and fixing that one is harder, and doesn't feel worthwhile.

Remove the broken charging of land unit mobility instead.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/conv.c

index ac465e2b093000528b5926c11f7346298567477c..0260f25ec231a7d59695931f369e695c7b2a205d 100644 (file)
@@ -28,6 +28,7 @@
  *
  *  Known contributors to this file:
  *     Dave Pare, 1986
+ *     Markus Armbruster, 2004-2015
  */
 
 /*
@@ -80,14 +81,11 @@ conv(void)
 
            /* Anti-terrorist units count double */
            if (lchr[(int)land.lnd_type].l_flags & L_SECURITY) {
-
                /*
                 * They also increase the efficiency of
                 * the conversion process by 10% each.
-                * (but they use 10 mobility doing it)
                 */
                security_extra += .1;
-               land.lnd_mobil -= 10;
                mil += land.lnd_item[I_MILIT];
            }
        }