(svn r20979) -Fix: [NewGRF] ignore the variable for action7/9 condition type 0x0D and 0x0E as documented

This commit is contained in:
yexo 2010-10-17 20:29:25 +00:00
parent 9a5e272195
commit 2ac00a16a0
1 changed files with 6 additions and 5 deletions

View File

@ -5062,12 +5062,13 @@ static void SkipIf(ByteReader *buf)
/*
* Parameter (variable in specs) 0x88 can only have GRF ID checking
* conditions, except conditions 0x0B and 0x0C (cargo availability)
* as those ignore the parameter. So, when the condition type is
* either of those, the specific variable 0x88 code is skipped, so
* the "general" code for the cargo availability conditions kicks in.
* conditions, except conditions 0x0B, 0x0C (cargo availability) and
* 0x0D, 0x0E (Rail type availability) as those ignore the parameter.
* So, when the condition type is one of those, the specific variable
* 0x88 code is skipped, so the "general" code for the cargo
* availability conditions kicks in.
*/
if (param == 0x88 && condtype != 0x0B && condtype != 0x0C) {
if (param == 0x88 && (condtype < 0x0B || condtype > 0x0E)) {
/* GRF ID checks */
GRFConfig *c = GetGRFConfig(cond_val, mask);