forked from mirror/openmw-tes3mp
[Client] Send ObjectDelete packets when summoned creatures despawn
This commit is contained in:
parent
0bed33e39e
commit
8c785fb22c
3 changed files with 28 additions and 1 deletions
|
@ -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…
Reference in a new issue