From b1a0ff2fbd87d3c332de1e0a41b3ddea133c77b1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 18 Apr 2008 21:26:15 +0200 Subject: [PATCH] Don't let trains load trains Doesn't affect the stock game, because its only train is heavy. --- info/Unit-types.t | 2 +- src/lib/commands/load.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/info/Unit-types.t b/info/Unit-types.t index 87d1ae15..1a0cca53 100644 --- a/info/Unit-types.t +++ b/info/Unit-types.t @@ -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 diff --git a/src/lib/commands/load.c b/src/lib/commands/load.c index 4b824ee4..3872df64 100644 --- a/src/lib/commands/load.c +++ b/src/lib/commands/load.c @@ -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;