mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Send cumulated inventory changes only each step (#8856)
Applies to player and detached inventories
This commit is contained in:
parent
a57f951e02
commit
fae6242d4e
5 changed files with 35 additions and 27 deletions
|
@ -524,9 +524,9 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
|
|||
}
|
||||
}
|
||||
|
||||
mgr->setInventoryModified(from_inv, false);
|
||||
mgr->setInventoryModified(from_inv);
|
||||
if (inv_from != inv_to)
|
||||
mgr->setInventoryModified(to_inv, false);
|
||||
mgr->setInventoryModified(to_inv);
|
||||
}
|
||||
|
||||
void IMoveAction::clientApply(InventoryManager *mgr, IGameDef *gamedef)
|
||||
|
@ -671,7 +671,7 @@ void IDropAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame
|
|||
if (item2.count != actually_dropped_count)
|
||||
errorstream<<"Could not take dropped count of items"<<std::endl;
|
||||
|
||||
mgr->setInventoryModified(from_inv, false);
|
||||
mgr->setInventoryModified(from_inv);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue