summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_localplayer.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/lua_api/l_localplayer.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/lua_api/l_localplayer.cpp')
-rw-r--r--src/script/lua_api/l_localplayer.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/script/lua_api/l_localplayer.cpp b/src/script/lua_api/l_localplayer.cpp
index 177df55f3..7ec4eaa62 100644
--- a/src/script/lua_api/l_localplayer.cpp
+++ b/src/script/lua_api/l_localplayer.cpp
@@ -203,34 +203,6 @@ int LuaLocalPlayer::l_get_breath(lua_State *L)
return 1;
}
-int LuaLocalPlayer::l_get_look_dir(lua_State *L)
-{
- LocalPlayer *player = getobject(L, 1);
-
- float pitch = -1.0 * player->getPitch() * core::DEGTORAD;
- float yaw = (player->getYaw() + 90.) * core::DEGTORAD;
- v3f v(cos(pitch) * cos(yaw), sin(pitch), cos(pitch) * sin(yaw));
-
- push_v3f(L, v);
- return 1;
-}
-
-int LuaLocalPlayer::l_get_look_horizontal(lua_State *L)
-{
- LocalPlayer *player = getobject(L, 1);
-
- lua_pushnumber(L, (player->getYaw() + 90.) * core::DEGTORAD);
- return 1;
-}
-
-int LuaLocalPlayer::l_get_look_vertical(lua_State *L)
-{
- LocalPlayer *player = getobject(L, 1);
-
- lua_pushnumber(L, -1.0 * player->getPitch() * core::DEGTORAD);
- return 1;
-}
-
int LuaLocalPlayer::l_get_pos(lua_State *L)
{
LocalPlayer *player = getobject(L, 1);
@@ -239,22 +211,6 @@ int LuaLocalPlayer::l_get_pos(lua_State *L)
return 1;
}
-int LuaLocalPlayer::l_get_eye_pos(lua_State *L)
-{
- LocalPlayer *player = getobject(L, 1);
-
- push_v3f(L, player->getEyePosition());
- return 1;
-}
-
-int LuaLocalPlayer::l_get_eye_offset(lua_State *L)
-{
- LocalPlayer *player = getobject(L, 1);
-
- push_v3f(L, player->getEyeOffset());
- return 1;
-}
-
int LuaLocalPlayer::l_get_movement_acceleration(lua_State *L)
{
LocalPlayer *player = getobject(L, 1);
@@ -393,12 +349,7 @@ const luaL_Reg LuaLocalPlayer::methods[] = {
luamethod(LuaLocalPlayer, get_last_look_vertical),
luamethod(LuaLocalPlayer, get_key_pressed),
luamethod(LuaLocalPlayer, get_breath),
- luamethod(LuaLocalPlayer, get_look_dir),
- luamethod(LuaLocalPlayer, get_look_horizontal),
- luamethod(LuaLocalPlayer, get_look_vertical),
luamethod(LuaLocalPlayer, get_pos),
- luamethod(LuaLocalPlayer, get_eye_pos),
- luamethod(LuaLocalPlayer, get_eye_offset),
luamethod(LuaLocalPlayer, get_movement_acceleration),
luamethod(LuaLocalPlayer, get_movement_speed),
luamethod(LuaLocalPlayer, get_movement),