summaryrefslogtreecommitdiff
path: root/src/newgrf_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_config.c')
-rw-r--r--src/newgrf_config.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/newgrf_config.c b/src/newgrf_config.c
index a6ab2fae5..977cb139e 100644
--- a/src/newgrf_config.c
+++ b/src/newgrf_config.c
@@ -70,14 +70,19 @@ bool FillGRFDetails(GRFConfig *config, bool is_static)
/* Find and load the Action 8 information */
/* 62 is the last file slot before sample.cat.
* Should perhaps be some "don't care" value */
- LoadNewGRFFile(config, 62, is_static ? GLS_SAFETYSCAN : GLS_FILESCAN);
-
- /* GCF_UNSAFE is set if GLS_SAFETYSCAN finds unsafe actions */
- if (HASBIT(config->flags, GCF_UNSAFE)) return false;
+ LoadNewGRFFile(config, 62, GLS_FILESCAN);
/* Skip if the grfid is 0 (not read) or 0xFFFFFFFF (ttdp system grf) */
if (config->grfid == 0 || config->grfid == 0xFFFFFFFF) return false;
+ if (is_static) {
+ /* Perform a 'safety scan' for static GRFs */
+ LoadNewGRFFile(config, 62, GLS_SAFETYSCAN);
+
+ /* GCF_UNSAFE is set if GLS_SAFETYSCAN finds unsafe actions */
+ if (HASBIT(config->flags, GCF_UNSAFE)) return false;
+ }
+
return CalcGRFMD5Sum(config);
}