mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Support loadfile in folder add-ons too
This commit is contained in:
parent
5693dcad44
commit
b3ef2b3344
1 changed files with 3 additions and 3 deletions
|
@ -275,7 +275,7 @@ static int luaB_dofile (lua_State *L) {
|
|||
int n = lua_gettop(L);
|
||||
|
||||
if (!W_FileHasFolders(wadfiles[numwadfiles - 1]))
|
||||
luaL_error(L, "dofile() only works with PK3 files");
|
||||
luaL_error(L, "dofile() only works with PK3 files and folders");
|
||||
|
||||
snprintf(fullfilename, sizeof(fullfilename), "Lua/%s", filename);
|
||||
lumpnum = W_CheckNumForFullNamePK3(fullfilename, numwadfiles - 1, 0);
|
||||
|
@ -293,8 +293,8 @@ static int luaB_loadfile (lua_State *L) {
|
|||
char fullfilename[256];
|
||||
UINT16 lumpnum;
|
||||
|
||||
if (wadfiles[numwadfiles - 1]->type != RET_PK3)
|
||||
luaL_error(L, "loadfile() only works with PK3 files");
|
||||
if (!W_FileHasFolders(wadfiles[numwadfiles - 1]))
|
||||
luaL_error(L, "loadfile() only works with PK3 files and folders");
|
||||
|
||||
snprintf(fullfilename, sizeof(fullfilename), "Lua/%s", filename);
|
||||
lumpnum = W_CheckNumForFullNamePK3(fullfilename, numwadfiles - 1, 0);
|
||||
|
|
Loading…
Reference in a new issue