From a765e71325c640ab47c60a41b950b446c5901d37 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 3 Apr 2020 14:50:08 +0200 Subject: Removed the obsolete cTracer class. (#4594) --- src/Bindings/AllToLua.pkg | 1 - src/Bindings/CMakeLists.txt | 1 - src/Bindings/DeprecatedBindings.cpp | 46 ------------------------------------- 3 files changed, 48 deletions(-) (limited to 'src/Bindings') diff --git a/src/Bindings/AllToLua.pkg b/src/Bindings/AllToLua.pkg index 1af7e8a21..919d70e18 100644 --- a/src/Bindings/AllToLua.pkg +++ b/src/Bindings/AllToLua.pkg @@ -60,7 +60,6 @@ $cfile "../WebAdmin.h" $cfile "../Root.h" $cfile "../Cuboid.h" $cfile "../BoundingBox.h" -$cfile "../Tracer.h" $cfile "../BlockArea.h" $cfile "../Generating/ChunkDesc.h" $cfile "../CraftingRecipes.h" diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt index ccd3f4dde..76a912d2b 100644 --- a/src/Bindings/CMakeLists.txt +++ b/src/Bindings/CMakeLists.txt @@ -133,7 +133,6 @@ set(BINDING_DEPENDENCIES ../Server.h ../Statistics.h ../StringUtils.h - ../Tracer.h ../UI/Window.h ../UUID.h ../Vector3.h diff --git a/src/Bindings/DeprecatedBindings.cpp b/src/Bindings/DeprecatedBindings.cpp index b9969ca65..fbbf408e6 100644 --- a/src/Bindings/DeprecatedBindings.cpp +++ b/src/Bindings/DeprecatedBindings.cpp @@ -9,7 +9,6 @@ #include "../World.h" #include "../Entities/Player.h" #include "LuaState.h" -#include "../Tracer.h" #include "../BlockInfo.h" @@ -470,47 +469,6 @@ static int tolua_set_cItem_m_Lore(lua_State * tolua_S) -/* method: Trace of class cTracer */ -static int tolua_cTracer_Trace(lua_State * a_LuaState) -{ - // Log a deprecation warning with stacktrace: - cLuaState S(a_LuaState); - LOGWARNING("The function cTracer:Trace is obsolete, use the cLineBlockTracer instead"); - S.LogStackTrace(); - - // Check params: - if ( - !S.CheckParamUserType(1, "cTracer") || - !S.CheckParamUserType(2, "const Vector3", 3) || - !S.CheckParamNumber (4) - ) - { - return 0; - } - - // Read params: - cTracer * self; - Vector3d * start; - Vector3d * direction; - int distance; - bool lineOfSight = false; - if (!S.GetStackValues(1, self, start, direction, distance)) - { - LOGWARNING("Cannot retrieve parameters for cTracer::Trace. Expected a cTracer (self), Vector3d, Vector3d, number and optional boolean."); - S.LogStackValues(); - return 0; - } - S.GetStackValue(5, lineOfSight); - - // Call and push the result: - S.Push(self->Trace(*start, *direction, distance, lineOfSight)); - return 1; -} - - - - - /** function: cWorld:SetSignLines */ static int tolua_cWorld_SetSignLines(lua_State * tolua_S) { @@ -642,10 +600,6 @@ void DeprecatedBindings::Bind(lua_State * tolua_S) tolua_variable(tolua_S, "m_Lore", tolua_get_cItem_m_Lore, tolua_set_cItem_m_Lore); tolua_endmodule(tolua_S); - tolua_beginmodule(tolua_S, "cTracer"); - tolua_function(tolua_S, "Trace", tolua_cTracer_Trace); - tolua_endmodule(tolua_S); - tolua_beginmodule(tolua_S, "cWorld"); tolua_function(tolua_S, "UpdateSign", tolua_cWorld_SetSignLines); tolua_endmodule(tolua_S); -- cgit v1.2.3