[Client] Sync actor movements from interiors to exteriors & vice versa

0.6.1
David Cernat 8 years ago
parent 7f6c5e2f48
commit ea2a060c67

@ -68,6 +68,7 @@ void LocalActor::updateCell()
LOG_APPEND(Log::LOG_INFO, "- Moved from %s to %s", cell.getDescription().c_str(), ptr.getCell()->getCell()->getDescription().c_str());
cell = *ptr.getCell()->getCell();
position = ptr.getRefData().getPosition();
mwmp::Main::get().getNetworking()->getActorList()->addCellChangeActor(*this);
}

@ -1,5 +1,16 @@
#include "actionteleport.hpp"
/*
Start of tes3mp addition
Include additional headers for multiplayer purposes
*/
#include "../mwmp/Main.hpp"
#include "../mwmp/CellController.hpp"
/*
End of tes3mp addition
*/
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
#include "../mwbase/mechanicsmanager.hpp"
@ -28,6 +39,17 @@ namespace MWWorld
for (std::set<MWWorld::Ptr>::iterator it = followers.begin(); it != followers.end(); ++it)
teleport(*it);
/*
Start of tes3mp addition
Update LocalActors before we unload their cells, so packets with their cell changes
can be sent
*/
mwmp::Main::get().getCellController()->updateLocal(false);
/*
End of tes3mp addition
*/
}
teleport(actor);

Loading…
Cancel
Save