1
0
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:
2006-11-28 23:44:12 +00:00
parent b23191ddae
commit 5f51f8e8a0

View File

@@ -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 */