Skip to content

Commit

Permalink
Maybe it needs the full path?
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelIT7 committed Apr 4, 2024
1 parent 20be39b commit 2efceee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/lua_ILuaInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,12 @@ void RunFile(ILuaThread* LUA, const char* file)
str_file = str_file.substr(4);
}

char* maxpath = new char[511];
gpFileSystem->RelativePathToFullPath(file, "GAME", maxpath, sizeof(maxpath));

Msg("RunFile: %s %s\n", file, str_file.c_str());
LUA->IFace->FindAndRunScript(str_file.c_str(), true, true, "", true);
LUA->IFace->FindAndRunScript(maxpath, true, true, "", true);
delete maxpath;

/*
std::string old_path = LUA->current_path;
Expand Down

0 comments on commit 2efceee

Please sign in to comment.