mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 23:51:09 -04:00
[Client] Send ObjectDelete packets when picking up items once again
When fixing problems with ObjectActivate in 49fa35a516d00f23a29fad302e8a4b6dfcc4b53b, 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
@ -765,6 +765,21 @@ namespace MWGui
|
|||||||
// can't use ActionTake here because we need an MWWorld::Ptr to the newly inserted object
|
// 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);
|
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
|
// remove from world
|
||||||
MWBase::Environment::get().getWorld()->deleteObject (object);
|
MWBase::Environment::get().getWorld()->deleteObject (object);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user