]> git.pond.sub.org Git - empserver/commitdiff
Don't let trains load trains
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 18 Apr 2008 19:26:15 +0000 (21:26 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 20 Apr 2008 13:11:15 +0000 (15:11 +0200)
Doesn't affect the stock game, because its only train is heavy.

info/Unit-types.t
src/lib/commands/load.c

index 87d1ae156094de5eac372156c603e39b01d846d7..1a0cca53dc6d146da6157045ed789f00015bf752 100644 (file)
@@ -195,7 +195,7 @@ the unit can fire 'general unit flak' (see "info Flak")
 .L spy
 the unit is a spy
 .L train
-the unit is a train
+the unit is a train, and can't be loaded on land units
 .L heavy
 the unit cannot be carried on land units or ships, not even supply ships
 .in
index 4b824ee4d3218f7dfc3afc75ef9e29e7cf0250ec..3872df64ed6b0a4feb47cb3fb02e9b1bdbedc78c 100644 (file)
@@ -985,7 +985,7 @@ load_land_land(struct sctstr *sectp, struct lndstr *lp, int noisy,
                    pr("%s can't be loaded onto itself!\n", prland(&land));
                continue;
            }
-           if (lchr[(int)land.lnd_type].l_flags & L_HEAVY) {
+           if (lchr[(int)land.lnd_type].l_flags & (L_HEAVY | L_TRAIN)) {
                if (noisy)
                    pr("%s is too heavy to load.\n", prland(&land));
                continue;