From 2df2c021dfcc990245345fcf1e7d4f86b4aba4f8 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 10 Nov 2010 17:04:32 +0000 Subject: (svn r21131) -Codechange: show a (debug) warning when the GRF ID of a NewGRF differs between the file scan and other stages --- src/newgrf.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index d8932c9f5..0cdeb6178 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -5230,7 +5230,11 @@ static void GRFInfo(ByteReader *buf) return; } - _cur_grffile->grfid = grfid; + if (_cur_grffile->grfid != grfid) { + DEBUG(grf, 0, "GRFInfo: GRFID %08X in FILESCAN stage does not match GRFID %08X in INIT/RESERVE/ACTIVATION stage", BSWAP32(_cur_grffile->grfid), BSWAP32(grfid)); + _cur_grffile->grfid = grfid; + } + _cur_grffile->grf_version = version; _cur_grfconfig->status = _cur_stage < GLS_RESERVE ? GCS_INITIALISED : GCS_ACTIVATED; -- cgit v1.2.3-70-g09d2