[Client] Send ObjectPlace packet for random creatures interrupting rest

0.6.1
David Cernat 8 years ago
parent dbdb11b5f0
commit 97768be14b

@ -84,7 +84,7 @@ namespace MWGui
Start of tes3mp change (major)
Instead of actually keeping this object as is, delete it after sending the packet
and wait for the server to send it back with the correct mpNum
and wait for the server to send it back with a unique mpNum of its own
*/
MWBase::Environment::get().getWorld()->deleteObject(dropped);
/*

@ -569,7 +569,7 @@ namespace MWScript
Start of tes3mp change (major)
Instead of actually keeping this object as is, delete it after sending the packet
and wait for the server to send it back with the correct mpNum
and wait for the server to send it back with a unique mpNum of its own
*/
MWBase::Environment::get().getWorld()->deleteObject(ptr);
/*

@ -3392,7 +3392,23 @@ namespace MWWorld
MWWorld::ManualRef ref(getStore(), selectedCreature, 1);
safePlaceObject(ref.getPtr(), getPlayerPtr(), getPlayerPtr().getCell(), 0, 220.f);
/*
Start of tes3mp change (major)
Send an ID_OBJECT_PLACE packet every time a random creature is spawned, then delete
the creature and wait for the server to send it back with a unique mpNum of its own
*/
MWWorld::Ptr ptr = safePlaceObject(ref.getPtr(), getPlayerPtr(), getPlayerPtr().getCell(), 0, 220.f);
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
worldEvent->reset();
worldEvent->addObjectPlace(ptr);
worldEvent->sendObjectPlace();
MWBase::Environment::get().getWorld()->deleteObject(ptr);
/*
End of tes3mp change (major)
*/
}
}

Loading…
Cancel
Save