From dca398e9a6db5f0366c53b2d7a115814d5090a72 Mon Sep 17 00:00:00 2001 From: glx Date: Tue, 2 Oct 2007 20:20:14 +0000 Subject: (svn r11196) -Fix (r11191): _cur_stage was incorrect for GLS_ACTIVATION stage --- src/newgrf.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 88fdc07ae..a3b8115a0 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -5508,13 +5508,17 @@ void LoadNewGRF(uint load_index, uint file_index) if (!FioCheckFileExists(c->filename)) error("NewGRF file is missing '%s'", c->filename); if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid); - LoadNewGRFFile(c, slot++, stage); + LoadNewGRFFile(c, slot, stage); if (stage == GLS_RESERVE) { if (c->status == GCS_ACTIVATED) c->status = GCS_INITIALISED; + _cur_stage = GLS_ACTIVATION; LoadNewGRFFile(c, slot++, GLS_ACTIVATION); + _cur_stage = stage; ClearTemporaryNewGRFData(); BuildCargoTranslationMap(); DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur_spriteid); + } else { + slot++; } } } -- cgit v1.2.3-70-g09d2