aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2017-04-01 20:38:14 +0200
committerparamat <mat.gregory@virginmedia.com>2017-05-03 03:16:20 +0100
commitf9fdb48dc85e53253ef93972355d3c7bc9d0ffb0 (patch)
tree96314426d03fffb6881bfc36bb961d2f6366fbf7 /src/script
parentbd921a7916f0fafc493b1c4d0eeb5e2bb1d6a7c2 (diff)
downloadminetest-f9fdb48dc85e53253ef93972355d3c7bc9d0ffb0.tar.gz
minetest-f9fdb48dc85e53253ef93972355d3c7bc9d0ffb0.tar.bz2
minetest-f9fdb48dc85e53253ef93972355d3c7bc9d0ffb0.zip
Sneak: Improve and fix various things
Remove useless `got_teleported`. Fix jitter when walking against the sneak limits. Fix damage evading on sneak ladders.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_localplayer.cpp9
-rw-r--r--src/script/lua_api/l_localplayer.h1
2 files changed, 0 insertions, 10 deletions
diff --git a/src/script/lua_api/l_localplayer.cpp b/src/script/lua_api/l_localplayer.cpp
index 4b44bb709..177df55f3 100644
--- a/src/script/lua_api/l_localplayer.cpp
+++ b/src/script/lua_api/l_localplayer.cpp
@@ -68,14 +68,6 @@ int LuaLocalPlayer::l_get_name(lua_State *L)
return 1;
}
-int LuaLocalPlayer::l_is_teleported(lua_State *L)
-{
- LocalPlayer *player = getobject(L, 1);
-
- lua_pushboolean(L, player->got_teleported);
- return 1;
-}
-
int LuaLocalPlayer::l_is_attached(lua_State *L)
{
LocalPlayer *player = getobject(L, 1);
@@ -386,7 +378,6 @@ const luaL_Reg LuaLocalPlayer::methods[] = {
luamethod(LuaLocalPlayer, get_velocity),
luamethod(LuaLocalPlayer, get_hp),
luamethod(LuaLocalPlayer, get_name),
- luamethod(LuaLocalPlayer, is_teleported),
luamethod(LuaLocalPlayer, is_attached),
luamethod(LuaLocalPlayer, is_touching_ground),
luamethod(LuaLocalPlayer, is_in_liquid),
diff --git a/src/script/lua_api/l_localplayer.h b/src/script/lua_api/l_localplayer.h
index 1070857c5..6ec3f4c09 100644
--- a/src/script/lua_api/l_localplayer.h
+++ b/src/script/lua_api/l_localplayer.h
@@ -39,7 +39,6 @@ private:
static int l_get_name(lua_State *L);
- static int l_is_teleported(lua_State *L);
static int l_is_attached(lua_State *L);
static int l_is_touching_ground(lua_State *L);
static int l_is_in_liquid(lua_State *L);