mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-31 02:19:09 +00:00
(svn r7284) -Fix (r2361): off by one when calculating vehicle newgrf variable 41 result, partly blamed by vague documentation... (thanks lakie)
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user