diff options
author | peter1138 <peter1138@openttd.org> | 2006-11-28 23:44:12 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-11-28 23:44:12 +0000 |
commit | 00053cd0f7e3f6e418e4cf8b994a46adbe2722f6 (patch) | |
tree | 67eb1f0cdc2e8a03f753495810a0ac0348ec87e1 | |
parent | 5f1d3498466bd598b870392c43520d75967bc19d (diff) | |
download | openttd-00053cd0f7e3f6e418e4cf8b994a46adbe2722f6.tar.xz |
(svn r7284) -Fix (r2361): off by one when calculating vehicle newgrf variable 41 result, partly blamed by vague documentation... (thanks lakie)
-rw-r--r-- | newgrf_engine.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newgrf_engine.c b/newgrf_engine.c index 64c88ab22..faa3bfef4 100644 --- a/newgrf_engine.c +++ b/newgrf_engine.c @@ -582,7 +582,7 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by u = u->next; } - return chain_before | chain_after << 8 | (chain_before + chain_after) << 16; + return chain_before | chain_after << 8 | (chain_before + chain_after + (variable == 0x41)) << 16; } case 0x42: { /* Consist cargo information */ |