- added Gez's anti-crossinclude submission but made some changes. Cross-includes overriding core files will produce fatal errors but cross-includes between PWADs will be tolerated. For DECORATE a command line override switch exists so that for testing the error can be disabled.
SVN r2400 (trunk)
This commit is contained in:
parent
853b8f8963
commit
6df5e6f9cb
5 changed files with 59 additions and 16 deletions
|
|
@ -52,6 +52,9 @@
|
|||
#include "thingdef_exp.h"
|
||||
#include "w_wad.h"
|
||||
#include "v_video.h"
|
||||
#include "version.h"
|
||||
#include "v_text.h"
|
||||
#include "m_argv.h"
|
||||
|
||||
void ParseOldDecoration(FScanner &sc, EDefinitionType def);
|
||||
|
||||
|
|
@ -1199,6 +1202,16 @@ void ParseDecorate (FScanner &sc)
|
|||
case TK_Include:
|
||||
{
|
||||
sc.MustGetString();
|
||||
// This check needs to remain overridable for testing purposes.
|
||||
if (Wads.GetLumpFile(sc.LumpNum) == 0 && !Args->CheckParm("-allowdecoratecrossincludes"))
|
||||
{
|
||||
int includefile = Wads.GetLumpFile(Wads.CheckNumForFullName(sc.String, true));
|
||||
if (includefile != 0)
|
||||
{
|
||||
I_FatalError("File %s is overriding core lump %s.",
|
||||
Wads.GetWadFullName(includefile), sc.String);
|
||||
}
|
||||
}
|
||||
FScanner newscanner;
|
||||
newscanner.Open(sc.String);
|
||||
ParseDecorate(newscanner);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue