aboutsummaryrefslogtreecommitdiff
path: root/src/script/common/c_content.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-10-18 16:18:07 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-10-18 16:18:07 +0200
commit1a7d3d8188d3f484b6c3f0f05fd057d543a34725 (patch)
treeeeb487998aa86e01c9a7d55d4ff1156cc598b349 /src/script/common/c_content.cpp
parent1e4f3549292472323d49ffad4e856ba60dd81e0c (diff)
downloaddragonfireclient-1a7d3d8188d3f484b6c3f0f05fd057d543a34725.tar.xz
Extended ClientObjectRef; Improved CrystalPvP
Diffstat (limited to 'src/script/common/c_content.cpp')
-rw-r--r--src/script/common/c_content.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 9efa2c57f..7d4c1e748 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "object_properties.h"
#include "collision.h"
#include "cpp_api/s_node.h"
+#include "lua_api/l_clientobject.h"
#include "lua_api/l_object.h"
#include "lua_api/l_item.h"
#include "common/c_internal.h"
@@ -1838,12 +1839,12 @@ void push_pointed_thing(lua_State *L, const PointedThing &pointed, bool csm,
lua_setfield(L, -2, "type");
if (csm) {
- lua_pushinteger(L, pointed.object_id);
- lua_setfield(L, -2, "id");
+ ClientObjectRef::create(L, pointed.object_id);
} else {
push_objectRef(L, pointed.object_id);
- lua_setfield(L, -2, "ref");
}
+
+ lua_setfield(L, -2, "ref");
} else {
lua_pushstring(L, "nothing");
lua_setfield(L, -2, "type");