diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 142b5a58c..c18003b44 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -1612,25 +1612,6 @@ void CharacterController::updateAnimQueue() void CharacterController::update(float duration) { - /* - Start of tes3mp addition - - Keep track of LocalActor and DedicatedActor objects so as to reuse them - */ - bool isLocalActor = mwmp::Main::get().getCellController()->isLocalActor(mPtr); - bool isDedicatedActor = mwmp::Main::get().getCellController()->isDedicatedActor(mPtr); - mwmp::LocalActor *localActor = 0; - mwmp::DedicatedActor *dedicatedActor = 0; - - if (isLocalActor) - localActor = mwmp::Main::get().getCellController()->getLocalActor(mPtr); - - if (isDedicatedActor) - dedicatedActor = mwmp::Main::get().getCellController()->getDedicatedActor(mPtr); - /* - End of tes3mp addition - */ - MWBase::World *world = MWBase::Environment::get().getWorld(); const MWWorld::Class &cls = mPtr.getClass(); osg::Vec3f movement(0.f, 0.f, 0.f); @@ -1692,8 +1673,9 @@ void CharacterController::update(float duration) Character movement setting rotations get reset here, so we have to assign movement settings to a relevant LocalActor now */ - if (isLocalActor) + if (mwmp::Main::get().getCellController()->isLocalActor(mPtr)) { + mwmp::LocalActor *localActor = mwmp::Main::get().getCellController()->getLocalActor(mPtr); localActor->direction.pos[0] = cls.getMovementSettings(mPtr).mPosition[0]; localActor->direction.pos[1] = cls.getMovementSettings(mPtr).mPosition[1]; localActor->direction.pos[2] = cls.getMovementSettings(mPtr).mPosition[2]; diff --git a/apps/openmw/mwmp/Cell.cpp b/apps/openmw/mwmp/Cell.cpp index a7762473f..4cb8309cf 100644 --- a/apps/openmw/mwmp/Cell.cpp +++ b/apps/openmw/mwmp/Cell.cpp @@ -305,8 +305,6 @@ void Cell::uninitializeLocalActors() { for (std::map::iterator it = localActors.begin(); it != localActors.end(); ++it) { - LocalActor *actor = it->second; - Main::get().getCellController()->removeLocalActorRecord(it->first); } diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index bca64f0b1..fe6ed77e7 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -334,7 +334,6 @@ void LocalPlayer::updatePosition(bool forceUpdate) void LocalPlayer::updateCell(bool forceUpdate) { const ESM::Cell *ptrCell = MWBase::Environment::get().getWorld()->getPlayerPtr().getCell()->getCell(); - bool cellChanged = false; // If the LocalPlayer's Ptr cell is different from the LocalPlayer's packet cell, proceed if (forceUpdate || !Main::get().getCellController()->isSameCell(*ptrCell, cell)) diff --git a/apps/openmw/mwmp/Main.cpp b/apps/openmw/mwmp/Main.cpp index 5a3ad72ee..7b611f049 100644 --- a/apps/openmw/mwmp/Main.cpp +++ b/apps/openmw/mwmp/Main.cpp @@ -190,8 +190,6 @@ void Main::destroy() void Main::frame(float dt) { - const MWBase::Environment &environment = MWBase::Environment::get(); - get().getNetworking()->update(); PlayerList::update(dt); diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 154ca2eb3..314574308 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -48,7 +48,6 @@ Networking::Networking(): peer(RakNet::RakPeerInterface::GetInstance()), playerP RakNet::SocketDescriptor sd; sd.port=0; - RakNet::StartupResult b = peer->Startup(1,&sd, 1); RakAssert(b==RAKNET_STARTED); playerPacketController.SetStream(0, &bsOut); @@ -213,8 +212,6 @@ void Networking::preInit(std::vector &content, Files::Collections & packetPreInit.SetSendStream(&bs); packetPreInit.Send(serverAddr); - - bool done = false; PacketPreInit::PluginContainer checksumsResponse; /*while (!done) { diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp index 604da65b1..18498ddcd 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp @@ -10,8 +10,6 @@ #include "apps/openmw/mwmp/Main.hpp" #include "apps/openmw/mwmp/CellController.hpp" -#include "../mwworld/worldimp.hpp" - namespace mwmp { class ProcessorActorAuthority : public ActorProcessor