From 5131675a60a73ebc2bb06e343e296950682e3631 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Thu, 13 May 2021 18:15:45 +0200 Subject: [PATCH] Add guards to stop server build fail --- src/script/cpp_api/s_base.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/script/cpp_api/s_base.cpp b/src/script/cpp_api/s_base.cpp index 867f61e0c..5711ccbfd 100644 --- a/src/script/cpp_api/s_base.cpp +++ b/src/script/cpp_api/s_base.cpp @@ -361,9 +361,11 @@ void ScriptApiBase::addObjectReference(ActiveObject *cobj) //infostream<<"scriptapi_add_object_reference: id="<getId()<(cobj)); else +#endif ObjectRef::create(L, dynamic_cast(cobj)); // Puts ObjectRef (as userdata) on stack int object = lua_gettop(L); @@ -394,9 +396,11 @@ void ScriptApiBase::removeObjectReference(ActiveObject *cobj) lua_pushnumber(L, cobj->getId()); // Push id lua_gettable(L, objectstable); // Set object reference to NULL +#ifndef SERVER if (m_type == ScriptingType::Client) ClientObjectRef::set_null(L); else +#endif ObjectRef::set_null(L); lua_pop(L, 1); // pop object -- 2.44.0