aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2016-10-08 17:56:38 +0200
committerNer'zhul <nerzhul@users.noreply.github.com>2016-10-08 22:27:44 +0200
commit7bbd716426bf989bf071e2322a9b797cc5f78acb (patch)
tree0c626a1cb5dd84a04c5963c020c0c9d29863e770 /src/script/lua_api
parentedba6e50d9c9c0a7120c251bed36a87b51f4c826 (diff)
downloadminetest-7bbd716426bf989bf071e2322a9b797cc5f78acb.tar.gz
minetest-7bbd716426bf989bf071e2322a9b797cc5f78acb.tar.bz2
minetest-7bbd716426bf989bf071e2322a9b797cc5f78acb.zip
RemotePlayer/LocalPlayer Player base class proper separation (code cleanup) (patch 3 of X)
* remove IGameDef from Player class, only LocalPlayer has it now * move many attributes/functions only used by LocalPlayer from Player to LocalPlayer * move many attributes/functions only used by RemotePlayer from Player to RemotePlayer * make some functions const * hudGetHotbarSelectedImage now returns const ref * RemotePlayer getHotbarSelectedImage now returns const ref * various code style fixes
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_object.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index 74b33da37..a1f83919c 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -1600,7 +1600,7 @@ int ObjectRef::l_hud_get_hotbar_selected_image(lua_State *L)
if (player == NULL)
return 0;
- std::string name = getServer(L)->hudGetHotbarSelectedImage(player);
+ const std::string &name = getServer(L)->hudGetHotbarSelectedImage(player);
lua_pushlstring(L, name.c_str(), name.size());
return 1;
}