diff options
author | peter1138 <peter1138@openttd.org> | 2007-06-05 21:41:31 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-06-05 21:41:31 +0000 |
commit | fdb7ef87039e0bdb27b96fa653f3d07279232453 (patch) | |
tree | 6032af7ce4e60f9160c7671498c29d46a7a991f4 | |
parent | 4258139a52cf6e3e7789826d0319bef12e9e6775 (diff) | |
download | openttd-fdb7ef87039e0bdb27b96fa653f3d07279232453.tar.xz |
(svn r10045) -Codechange: Process Action 8 during GLS_RESERVATION to allow Action 7/Action 9s to work properly
-rw-r--r-- | src/newgrf.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index dfcb1ea64..c0071c206 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -3271,7 +3271,7 @@ static void SkipIf(byte *buf, int len) _skip_sprites = -1; /* If an action 8 hasn't been encountered yet, disable the grf. */ - if (_cur_stage != GLS_RESERVE && _cur_grfconfig->status != GCS_ACTIVATED) _cur_grfconfig->status = GCS_DISABLED; + if (_cur_grfconfig->status != GCS_ACTIVATED) _cur_grfconfig->status = GCS_DISABLED; } } @@ -3321,7 +3321,7 @@ static void GRFInfo(byte *buf, int len) _cur_grffile->grfid = grfid; _cur_grffile->grf_version = version; - _cur_grfconfig->status = _cur_stage < GLS_ACTIVATION ? GCS_INITIALISED : GCS_ACTIVATED; + _cur_grfconfig->status = _cur_stage < GLS_RESERVE ? GCS_INITIALISED : GCS_ACTIVATED; /* Do swap the GRFID for displaying purposes since people expect that */ DEBUG(grf, 1, "GRFInfo: Loaded GRFv%d set %08lX - %s", version, BSWAP32(grfid), name); @@ -3428,7 +3428,7 @@ static void GRFLoadError(byte *buf, int len) /* Skip the error until the activation stage unless bit 7 of the severity * is set. */ - if (!HASBIT(severity, 7) && _cur_stage < GLS_ACTIVATION) { + if (!HASBIT(severity, 7) && _cur_stage == GLS_INIT) { grfmsg(7, "GRFLoadError: Skipping non-fatal GRFLoadError in stage %d", _cur_stage); return; } @@ -4754,7 +4754,7 @@ static void DecodeSpecialSprite(uint num, GrfLoadingStage stage) /* 0x05 */ { SkipAct5, SkipAct5, SkipAct5, SkipAct5, SkipAct5, GraphicsNew, }, /* 0x06 */ { NULL, NULL, NULL, CfgApply, CfgApply, CfgApply, }, /* 0x07 */ { NULL, NULL, NULL, NULL, SkipIf, SkipIf, }, - /* 0x08 */ { ScanInfo, NULL, NULL, GRFInfo, NULL, GRFInfo, }, + /* 0x08 */ { ScanInfo, NULL, NULL, GRFInfo, GRFInfo, GRFInfo, }, /* 0x09 */ { NULL, NULL, NULL, SkipIf, SkipIf, SkipIf, }, /* 0x0A */ { SkipActA, SkipActA, SkipActA, SkipActA, SkipActA, SpriteReplace, }, /* 0x0B */ { NULL, NULL, NULL, GRFLoadError, GRFLoadError, GRFLoadError, }, @@ -4823,7 +4823,8 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage) if (stage != GLS_FILESCAN && stage != GLS_SAFETYSCAN && stage != GLS_LABELSCAN) { _cur_grffile = GetFileByFilename(filename); if (_cur_grffile == NULL) error("File '%s' lost in cache.\n", filename); - if (stage == GLS_ACTIVATION && config->status != GCS_INITIALISED) return; + if (stage == GLS_RESERVE && config->status != GCS_INITIALISED) return; + if (stage == GLS_ACTIVATION && config->status != GCS_ACTIVATED) return; } FioOpenFile(file_index, filename); |