summaryrefslogtreecommitdiff
path: root/src/oldloader.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-04-29 21:31:29 +0000
committerpeter1138 <peter1138@openttd.org>2008-04-29 21:31:29 +0000
commita00371c8db9d3b944d901ea0468eb58fe51418a7 (patch)
tree82b8c0d69acb1c38843e4fcf0b11f46a057ef270 /src/oldloader.cpp
parent1d01390fa6d6ca83cd0cb148137d2a81749b380d (diff)
downloadopenttd-a00371c8db9d3b944d901ea0468eb58fe51418a7.tar.xz
(svn r12924) -Feature: Introducing the so called 'engine pool' which primarily removes the fixed engine type limits and also happens to allow (with the patch option 'dynamic_engines') multiple NewGRF vehicle sets to coexist.
Diffstat (limited to 'src/oldloader.cpp')
-rw-r--r--src/oldloader.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/oldloader.cpp b/src/oldloader.cpp
index ef367731c..dd4924a8f 100644
--- a/src/oldloader.cpp
+++ b/src/oldloader.cpp
@@ -1330,18 +1330,19 @@ static const OldChunks engine_chunk[] = {
static bool LoadOldEngine(LoadgameState *ls, int num)
{
- if (!LoadChunk(ls, GetEngine(num), engine_chunk)) return false;
+ Engine *e = GetTempDataEngine(num);
+ if (!LoadChunk(ls, e, engine_chunk)) return false;
/* Make sure wagons are marked as do-not-age */
if ((num >= 27 && num < 54) || (num >= 57 && num < 84) || (num >= 89 && num < 116))
- GetEngine(num)->age = 0xFFFF;
+ e->age = 0xFFFF;
return true;
}
static bool LoadOldEngineName(LoadgameState *ls, int num)
{
- Engine *e = GetEngine(num);
+ Engine *e = GetTempDataEngine(num);
e->name = CopyFromOldName(RemapOldStringID(ReadUint16(ls)));
return true;
}