summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_object.cpp
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-10-31 18:19:23 +0000
committerGitHub <noreply@github.com>2020-10-31 18:19:23 +0000
commit89dd05fdf35ce465fcc2b3588337f79f818a78aa (patch)
tree8cd34c9435fd0feca4d35184649bc002cc53d260 /src/script/lua_api/l_object.cpp
parent2dff3dd03f7ba25f3fab7c360759ddbf93615668 (diff)
downloadminetest-89dd05fdf35ce465fcc2b3588337f79f818a78aa.tar.gz
minetest-89dd05fdf35ce465fcc2b3588337f79f818a78aa.tar.bz2
minetest-89dd05fdf35ce465fcc2b3588337f79f818a78aa.zip
Fix segfault in deprecation logging due to tail call, log by default (#10174)
Diffstat (limited to 'src/script/lua_api/l_object.cpp')
-rw-r--r--src/script/lua_api/l_object.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index c3f0ec8e0..beb8dd339 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -2278,7 +2278,6 @@ void ObjectRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
- markAliasDeprecated(methods);
luaL_openlib(L, 0, methods, 0); // fill methodtable
lua_pop(L, 1); // drop methodtable
}
@@ -2316,10 +2315,9 @@ luaL_Reg ObjectRef::methods[] = {
luamethod(ObjectRef, get_nametag_attributes),
luamethod_aliased(ObjectRef, set_velocity, setvelocity),
- luamethod(ObjectRef, add_velocity),
- {"add_player_velocity", ObjectRef::l_add_velocity},
+ luamethod_aliased(ObjectRef, add_velocity, add_player_velocity),
luamethod_aliased(ObjectRef, get_velocity, getvelocity),
- {"get_player_velocity", ObjectRef::l_get_velocity},
+ luamethod_dep(ObjectRef, get_velocity, get_player_velocity),
// LuaEntitySAO-only
luamethod_aliased(ObjectRef, set_acceleration, setacceleration),