Merge branch 'next' into toast_slopes

This commit is contained in:
Alam Ed Arias 2016-06-02 17:45:16 -04:00
commit 31a59f8ae6
2 changed files with 5 additions and 2 deletions

View file

@ -8276,6 +8276,9 @@ static inline int lib_getenum(lua_State *L)
} else if (fastcmp(word,"VERSIONSTRING")) {
lua_pushstring(L, VERSIONSTRING);
return 1;
} else if (fastcmp(word, "token")) {
lua_pushinteger(L, token);
return 1;
}
return 0;

View file

@ -475,11 +475,11 @@ UINT16 W_LoadWadFile(const char *filename)
//
CONS_Printf(M_GetText("Added file %s (%u lumps)\n"), filename, numlumps);
wadfiles[numwadfiles] = wadfile;
W_LoadDehackedLumps(numwadfiles);
numwadfiles++; // must come BEFORE W_LoadDehackedLumps, so any addfile called by COM_BufInsertText called by Lua doesn't overwrite what we just loaded
W_LoadDehackedLumps(numwadfiles-1);
W_InvalidateLumpnumCache();
numwadfiles++;
return wadfile->numlumps;
}