[Client] Send ObjectDelete packets when summoned creatures despawn

pull/249/merge
David Cernat 8 years ago
parent 0bed33e39e
commit 8c785fb22c

@ -22,6 +22,7 @@
#include "../mwmp/PlayerList.hpp"
#include "../mwmp/CellController.hpp"
#include "../mwmp/MechanicsHelper.hpp"
#include "../mwmp/WorldEvent.hpp"
/*
End of tes3mp addition
*/
@ -1520,6 +1521,19 @@ namespace MWMechanics
{
MWBase::Environment::get().getWorld()->deleteObject(ptr);
/*
Start of tes3mp addition
Send an ID_OBJECT_DELETE packet every time a summoned creature despawns
*/
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
worldEvent->reset();
worldEvent->addObjectDelete(ptr);
worldEvent->sendObjectDelete();
/*
End of tes3mp addition
*/
const ESM::Static* fx = MWBase::Environment::get().getWorld()->getStore().get<ESM::Static>()
.search("VFX_Summon_End");
if (fx)

@ -175,6 +175,19 @@ namespace MWMechanics
"", ptr.getRefData().getPosition().asVec3());
MWBase::Environment::get().getWorld()->deleteObject(ptr);
/*
Start of tes3mp addition
Send an ID_OBJECT_DELETE packet every time a summoned creature despawns
*/
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
worldEvent->reset();
worldEvent->addObjectDelete(ptr);
worldEvent->sendObjectDelete();
/*
End of tes3mp addition
*/
}
else
++it;

@ -3405,7 +3405,7 @@ namespace MWWorld
worldEvent->addObjectSpawn(ptr);
worldEvent->sendObjectSpawn();
MWBase::Environment::get().getWorld()->deleteObject(ptr);
deleteObject(ptr);
/*
End of tes3mp change (major)
*/

Loading…
Cancel
Save