summaryrefslogtreecommitdiff
path: root/oldloader.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-04 13:23:29 +0000
committertruelight <truelight@openttd.org>2005-02-04 13:23:29 +0000
commit42f98c7eec8cd46ea8452911fb4381f209de342f (patch)
tree512961ac36580ababc52512c67235f48f4bef8c8 /oldloader.c
parent88ebe22d8b6e844b501688673f71db3505ea2b57 (diff)
downloadopenttd-42f98c7eec8cd46ea8452911fb4381f209de342f.tar.xz
(svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles)
Diffstat (limited to 'oldloader.c')
-rw-r--r--oldloader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/oldloader.c b/oldloader.c
index 4ad72a72f..ad7455c4e 100644
--- a/oldloader.c
+++ b/oldloader.c
@@ -797,6 +797,9 @@ static void FixVehicle(OldVehicle *o, int num)
if (o->type == 0)
continue;
+ if (!AddBlockIfNeeded(&_vehicle_pool, i))
+ error("Vehicles: failed loading savegame: too many vehicles");
+
n = GetVehicle(i);
n->type = o->type;