summaryrefslogtreecommitdiff
path: root/src/script/scripting_client.cpp
diff options
context:
space:
mode:
authorbigfoot547 <bigfoot547@users.noreply.github.com>2017-05-05 15:07:36 -0500
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-05-05 22:07:36 +0200
commitde028fc056b26e03ee00324888f870f64e28c756 (patch)
treeba0bdcc2bf2b94bf321aad7a38311c778f6f7606 /src/script/scripting_client.cpp
parente8b00fdf987e9c689f3dbf9c22c0a6269250c3b5 (diff)
downloadminetest-de028fc056b26e03ee00324888f870f64e28c756.tar.gz
minetest-de028fc056b26e03ee00324888f870f64e28c756.tar.bz2
minetest-de028fc056b26e03ee00324888f870f64e28c756.zip
[CSM] Add camera API (#5609)
* [CSM] Add camera API roper rebase & squash * Address nerzhul's review
Diffstat (limited to 'src/script/scripting_client.cpp')
-rw-r--r--src/script/scripting_client.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/script/scripting_client.cpp b/src/script/scripting_client.cpp
index 8ff5abcc4..b5a5085be 100644
--- a/src/script/scripting_client.cpp
+++ b/src/script/scripting_client.cpp
@@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_item.h"
#include "lua_api/l_nodemeta.h"
#include "lua_api/l_localplayer.h"
+#include "lua_api/l_camera.h"
ClientScripting::ClientScripting(Client *client):
ScriptApiBase()
@@ -71,6 +72,7 @@ void ClientScripting::InitializeModApi(lua_State *L, int top)
LuaMinimap::Register(L);
NodeMetaRef::RegisterClient(L);
LuaLocalPlayer::Register(L);
+ LuaCamera::Register(L);
}
void ClientScripting::on_client_ready(LocalPlayer *localplayer)
@@ -78,3 +80,8 @@ void ClientScripting::on_client_ready(LocalPlayer *localplayer)
lua_State *L = getStack();
LuaLocalPlayer::create(L, localplayer);
}
+
+void ClientScripting::on_camera_ready(Camera *camera)
+{
+ LuaCamera::create(getStack(), camera);
+}