mirror of https://github.com/OpenTTD/OpenTTD.git
(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:
parent
b23191ddae
commit
5f51f8e8a0
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue