mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-13 11:39:47 +00:00
[Client] Sync actor movements from interiors to exteriors & vice versa
This commit is contained in:
parent
7f6c5e2f48
commit
ea2a060c67
2 changed files with 23 additions and 0 deletions
apps/openmw
|
@ -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…
Reference in a new issue