(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:
peter1138 2006-11-28 23:44:12 +00:00
parent b23191ddae
commit 5f51f8e8a0
1 changed files with 1 additions and 1 deletions

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