mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r20979) -Fix: [NewGRF] ignore the variable for action7/9 condition type 0x0D and 0x0E as documented
This commit is contained in:
parent
9a5e272195
commit
2ac00a16a0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user