mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-09 16:32:33 +00:00
dehacked.c: Forbid not providing an Emblem ID
Too much of gamedata is dependent on explicit ordering
This commit is contained in:
parent
e9b7ed8101
commit
69e8d15974
1 changed files with 22 additions and 26 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue