summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newgrf_engine.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/newgrf_engine.c b/newgrf_engine.c
index 5460c5932..feb037f67 100644
--- a/newgrf_engine.c
+++ b/newgrf_engine.c
@@ -627,6 +627,12 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
}
return count;
}
+
+ case 0x7F: { /* Read GRF parameter */
+ const GRFFile *file = GetEngineGRF(v->engine_type);
+ if (parameter >= file->param_end) return 0;
+ return file->param[parameter];
+ }
}
/* General vehicle properties */