diff --git a/src/dehacked.c b/src/dehacked.c index 0bb710a18..efb9564d2 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -252,32 +252,6 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile) else i = 0; - if (fastcmp(word, "EMBLEM")) - { - if (!mainfile && !gamedataadded) - { - deh_warning("You must define a custom gamedata to use \"%s\"", word); - ignorelines(f); - } - else - { - if (!word2) - i = numemblems + 1; - - if (i > 0 && i <= MAXEMBLEMS) - { - if (numemblems < i) - numemblems = i; - reademblemdata(f, i); - } - else - { - deh_warning("Emblem number %d out of range (1 - %d)", i, MAXEMBLEMS); - ignorelines(f); - } - } - continue; - } if (word2) { if (fastcmp(word, "THING") || fastcmp(word, "MOBJ") || fastcmp(word, "OBJECT")) @@ -430,6 +404,28 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile) ignorelines(f); } } + else if (fastcmp(word, "EMBLEM")) + { + if (!mainfile && !gamedataadded) + { + deh_warning("You must define a custom gamedata to use \"%s\"", word); + ignorelines(f); + } + else if (i > 0 && i <= MAXEMBLEMS) + { + if (numemblems < i) + { + // This is no longer strictly necessary... but I've left it in as an optimisation, because the datatype is now immensohuge, heh. + numemblems = i; + } + reademblemdata(f, i); + } + else + { + deh_warning("Emblem number %d out of range (1 - %d)", i, MAXEMBLEMS); + ignorelines(f); + } + } else if (fastcmp(word, "UNLOCKABLE")) { if (!mainfile && !gamedataadded)