diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-18 16:18:07 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-10-18 16:18:07 +0200 |
commit | 1a7d3d8188d3f484b6c3f0f05fd057d543a34725 (patch) | |
tree | eeb487998aa86e01c9a7d55d4ff1156cc598b349 /src/script/common/c_content.cpp | |
parent | 1e4f3549292472323d49ffad4e856ba60dd81e0c (diff) | |
download | dragonfireclient-1a7d3d8188d3f484b6c3f0f05fd057d543a34725.tar.xz |
Extended ClientObjectRef; Improved CrystalPvP
Diffstat (limited to 'src/script/common/c_content.cpp')
-rw-r--r-- | src/script/common/c_content.cpp | 7 |
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"); |