diff options
author | glx <glx@openttd.org> | 2007-10-13 02:49:05 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-10-13 02:49:05 +0000 |
commit | 21547b46ef6a723474b4ed22dcee9bb3464a99c8 (patch) | |
tree | 9e20564982ec5706f069a777aee786ab1eb04c51 /src/newgrf.cpp | |
parent | 73fcdf77e0865025d563a5c9eed6e8c91655ab6c (diff) | |
download | openttd-21547b46ef6a723474b4ed22dcee9bb3464a99c8.tar.xz |
(svn r11253) -Fix (r9411): industries can still use cargo they define, even if these cargo are disabled by a grf loaded later
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 28ca65342..8eb545412 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1541,8 +1541,8 @@ static bool CargoChangeInfo(uint cid, int numinfo, int prop, byte **bufp, int le switch (prop) { case 0x08: /* Bit number of cargo */ cs->bitnum = grf_load_byte(&buf); - cs->grfid = _cur_grffile->grfid; if (cs->IsValid()) { + cs->grfid = _cur_grffile->grfid; SETBIT(_cargo_mask, cid + i); } else { CLRBIT(_cargo_mask, cid + i); @@ -5271,7 +5271,7 @@ static void MapNewCargoStrings() for (CargoID c = 0; c < NUM_CARGO; c++) { CargoSpec *cs = &_cargo[c]; /* Don't map if the cargo is unavailable or not from NewGRF */ - if (!cs->IsValid() || cs->grfid == 0) continue; + if (cs->grfid == 0) continue; cs->name = MapGRFStringID(cs->grfid, cs->name); cs->name_single = MapGRFStringID(cs->grfid, cs->name_single); |