mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
We always know playerSAO when calling SendInventory. Using it instead of searching it via peer_id
This commit is contained in:
parent
bbed01ab62
commit
7e088fdfe3
4 changed files with 12 additions and 12 deletions
|
@ -356,7 +356,7 @@ int ObjectRef::l_set_wielded_item(lua_State *L)
|
|||
ItemStack item = read_item(L, 2, getServer(L));
|
||||
bool success = co->setWieldedItem(item);
|
||||
if (success && co->getType() == ACTIVEOBJECT_TYPE_PLAYER) {
|
||||
getServer(L)->SendInventory(((PlayerSAO*)co)->getPeerID());
|
||||
getServer(L)->SendInventory(((PlayerSAO*)co));
|
||||
}
|
||||
lua_pushboolean(L, success);
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue