mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 04:06:43 +00:00
[Client] Send ObjectDelete packets when picking up items once again
When fixing problems with ObjectActivate in 49fa35a516
, I mistakenly made it so the picking up of items no longer also sent ObjectDelete packets. That is now fixed.
This commit is contained in:
parent
7acf6865b9
commit
56c3ef71ae
1 changed files with 15 additions and 0 deletions
|
@ -765,6 +765,21 @@ namespace MWGui
|
|||
// can't use ActionTake here because we need an MWWorld::Ptr to the newly inserted object
|
||||
MWWorld::Ptr newObject = *player.getClass().getContainerStore (player).add (object, object.getRefData().getCount(), player);
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Send an ID_OBJECT_DELETE packet every time an item from the world is picked up
|
||||
by the player through the inventory HUD
|
||||
*/
|
||||
mwmp::ObjectList *objectList = mwmp::Main::get().getNetworking()->getObjectList();
|
||||
objectList->reset();
|
||||
objectList->packetOrigin = mwmp::CLIENT_GAMEPLAY;
|
||||
objectList->addObjectDelete(object);
|
||||
objectList->sendObjectDelete();
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
// remove from world
|
||||
MWBase::Environment::get().getWorld()->deleteObject (object);
|
||||
|
||||
|
|
Loading…
Reference in a new issue