diff --git a/apps/openmw/mwmp/LocalActor.cpp b/apps/openmw/mwmp/LocalActor.cpp index 1376b1c5b..08053ac7f 100644 --- a/apps/openmw/mwmp/LocalActor.cpp +++ b/apps/openmw/mwmp/LocalActor.cpp @@ -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); } diff --git a/apps/openmw/mwworld/actionteleport.cpp b/apps/openmw/mwworld/actionteleport.cpp index 93705f005..0d5f642d6 100644 --- a/apps/openmw/mwworld/actionteleport.cpp +++ b/apps/openmw/mwworld/actionteleport.cpp @@ -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::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);