From 89dd05fdf35ce465fcc2b3588337f79f818a78aa Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 31 Oct 2020 18:19:23 +0000 Subject: Fix segfault in deprecation logging due to tail call, log by default (#10174) --- src/script/lua_api/l_object.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/script/lua_api/l_object.cpp') 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), -- cgit v1.2.3