[Client] Remove unused include and variables, fixing warnings

pull/176/merge
David Cernat 8 years ago
parent 51422da641
commit e4a261ea2e

@ -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];

@ -305,8 +305,6 @@ void Cell::uninitializeLocalActors()
{
for (std::map<std::string, LocalActor *>::iterator it = localActors.begin(); it != localActors.end(); ++it)
{
LocalActor *actor = it->second;
Main::get().getCellController()->removeLocalActorRecord(it->first);
}

@ -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))

@ -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);

@ -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<std::string> &content, Files::Collections &
packetPreInit.SetSendStream(&bs);
packetPreInit.Send(serverAddr);
bool done = false;
PacketPreInit::PluginContainer checksumsResponse;
/*while (!done)
{

@ -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

Loading…
Cancel
Save