diff options
author | frosch <frosch@openttd.org> | 2012-06-28 19:24:26 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2012-06-28 19:24:26 +0000 |
commit | ee25344a6d50ec4f4443570566254152b3b33c67 (patch) | |
tree | c0effe7a7e4b0a21be8c12fb69e0af9ed2d26c45 /src | |
parent | 06686c237c71267bc9b13ba3a217d0b01fd24ab8 (diff) | |
download | openttd-ee25344a6d50ec4f4443570566254152b3b33c67.tar.xz |
(svn r24360) -Fix [FS#5224]: Ship-specific 80+x variables were missing for unknown reason. (Hirundo)
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_engine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 97dd90ca9..908d15a84 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -23,6 +23,7 @@ #include "station_base.h" #include "company_base.h" #include "newgrf_railtype.h" +#include "ship.h" struct WagonOverride { EngineID *train_id; @@ -834,6 +835,14 @@ static uint32 VehicleGetVariable(Vehicle *v, const ResolverObject *object, byte break; } + case VEH_SHIP: { + Ship *s = Ship::From(v); + switch (variable - 0x80) { + case 0x62: return s->state; + } + break; + } + case VEH_AIRCRAFT: { Aircraft *a = Aircraft::From(v); switch (variable - 0x80) { |