1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Wieldhand: Specify which ItemStack to use (#8961)

Makes 'get_wield_item' to return the "main" ItemStack
This commit is contained in:
SmallJoker 2019-09-21 11:44:24 +02:00 committed by GitHub
parent 47da640d77
commit 5fa614d97e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 37 additions and 41 deletions

View file

@ -340,7 +340,9 @@ int ObjectRef::l_get_wielded_item(lua_State *L)
return 1;
}
LuaItemStack::create(L, co->getWieldedItem());
ItemStack selected_item;
co->getWieldedItem(&selected_item, nullptr);
LuaItemStack::create(L, selected_item);
return 1;
}