Fix current mod name change missed during rebase

This commit is contained in:
ShadowNinja 2015-05-16 19:09:53 -04:00 committed by OttoLidenbrock
parent 6e9f054982
commit 2142015720
1 changed files with 4 additions and 4 deletions

View File

@ -49,12 +49,12 @@ GUIEngine *ModApiBase::getGuiEngine(lua_State *L)
std::string ModApiBase::getCurrentModPath(lua_State *L) std::string ModApiBase::getCurrentModPath(lua_State *L)
{ {
lua_getfield(L, LUA_REGISTRYINDEX, "current_modname"); lua_getfield(L, LUA_REGISTRYINDEX, SCRIPT_MOD_NAME_FIELD);
const char *current_modname = lua_tostring(L, -1); const char *current_mod_name = lua_tostring(L, -1);
if (!current_modname) if (!current_mod_name)
return "."; return ".";
const ModSpec *mod = getServer(L)->getModSpec(current_modname); const ModSpec *mod = getServer(L)->getModSpec(current_mod_name);
if (!mod) if (!mod)
return "."; return ".";