Load def modules even if no root def exists. Print a message to the log for each def module that is loaded.

git-svn-id: https://svn.eduke32.com/eduke32@3621 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2013-03-28 09:06:14 +00:00
parent cae310d8d5
commit ba1ac9d89a

View file

@ -122,6 +122,13 @@ static void defsparser_include(const char *fn, const scriptfile *script, const c
}
else
{
if (!cmdtokptr)
{
flushlogwindow = 1;
initprintf("Loading module \"%s\"\n",fn);
flushlogwindow = 0;
}
defsparser(included);
scriptfile_close(included);
}
@ -2101,20 +2108,28 @@ int32_t loaddefinitionsfile(const char *fn)
int32_t i;
script = scriptfile_fromfile(fn);
if (!script) return -1;
flushlogwindow = 1;
initprintf("Loading \"%s\"\n",fn);
flushlogwindow = 0;
defsparser(script);
if (script)
{
flushlogwindow = 1;
initprintf("Loading \"%s\"\n",fn);
flushlogwindow = 0;
defsparser(script);
}
for (i=0; i < g_defModulesNum; ++i)
defsparser_include(g_defModules[i], NULL, NULL);
flushlogwindow = f;
scriptfile_close(script);
if (script)
scriptfile_close(script);
scriptfile_clearsymbols();
if (!script) return -1;
return 0;
}