(svn r24360) -Fix [FS#5224]: Ship-specific 80+x variables were missing for unknown reason. (Hirundo)

This commit is contained in:
frosch 2012-06-28 19:24:26 +00:00
parent 06686c237c
commit ee25344a6d
1 changed files with 9 additions and 0 deletions

View File

@ -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) {