Fix current mod name change missed during rebase
authorShadowNinja <shadowninja@minetest.net>
Sat, 16 May 2015 23:09:53 +0000 (19:09 -0400)
committerShadowNinja <shadowninja@minetest.net>
Sun, 17 May 2015 01:12:03 +0000 (21:12 -0400)
src/script/lua_api/l_base.cpp

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