1
0
Fork 1
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:
David Cernat 2019-11-30 08:13:22 +02:00
parent 7acf6865b9
commit 56c3ef71ae

View file

@ -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);