diff options
author | peter1138 <peter1138@openttd.org> | 2006-05-31 17:40:48 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-05-31 17:40:48 +0000 |
commit | 82bb84d6cc45039cad147672f139931d4e453d23 (patch) | |
tree | 62ecc6966d7be74d3d5096a1dd6a8113cd67f6a8 | |
parent | 4aa2054b1a98eb9455f02204426f8e65d6ce1c6d (diff) | |
download | openttd-82bb84d6cc45039cad147672f139931d4e453d23.tar.xz |
(svn r5060) - NewGRF: add support for variable 7F (retrieve GRF parameter) for vehicles
-rw-r--r-- | newgrf_engine.c | 6 |
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 */ |