diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-10-04 08:31:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 08:31:36 -0400 |
commit | 7632af3c73fc4e4ae3ad4c98c90c39b47c3b8379 (patch) | |
tree | 08b974d6ecafb6c20de565f96e329748030c1519 /src/script/common | |
parent | b21fb1837955e6385137184cac906245821b20e4 (diff) | |
download | minetest-7632af3c73fc4e4ae3ad4c98c90c39b47c3b8379.tar.xz |
Consolidate API object code (#12728)
Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'src/script/common')
-rw-r--r-- | src/script/common/c_content.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 93202dcee..928717a05 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -1078,7 +1078,7 @@ void read_server_sound_params(lua_State *L, int index, lua_pop(L, 1); lua_getfield(L, index, "object"); if(!lua_isnil(L, -1)){ - ObjectRef *ref = ObjectRef::checkobject(L, -1); + ObjectRef *ref = ModApiBase::checkObject<ObjectRef>(L, -1); ServerActiveObject *sao = ObjectRef::getobject(ref); if(sao){ params.object = sao->getId(); @@ -1264,7 +1264,7 @@ ItemStack read_item(lua_State* L, int index, IItemDefManager *idef) if (lua_isuserdata(L, index)) { // Convert from LuaItemStack - LuaItemStack *o = LuaItemStack::checkobject(L, index); + LuaItemStack *o = ModApiBase::checkObject<LuaItemStack>(L, index); return o->getItem(); } |