[Client] Rename WorldController into CellController to avoid confusion with Networking's WorldPacketController

0.6.1
David Cernat 8 years ago
parent ba8341bfb5
commit 679e790d8d

@ -7,7 +7,7 @@
#include "../mwmp/Main.hpp"
#include "../mwmp/Networking.hpp"
#include "../mwmp/WorldEvent.hpp"
#include "../mwmp/WorldController.hpp"
#include "../mwmp/CellController.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"
@ -213,7 +213,7 @@ namespace MWGui
void ContainerWindow::openContainer(const MWWorld::Ptr& container, bool loot)
{
mwmp::Main::get().getWorldController()->openContainer(container, loot);
mwmp::Main::get().getCellController()->openContainer(container, loot);
mPickpocketDetected = false;
mPtr = container;
@ -258,7 +258,7 @@ namespace MWGui
void ContainerWindow::close()
{
mwmp::Main::get().getWorldController()->closeContainer(mPtr);
mwmp::Main::get().getCellController()->closeContainer(mPtr);
WindowBase::close();
if (dynamic_cast<PickpocketItemModel*>(mModel)

@ -5,27 +5,26 @@
#include "../mwworld/containerstore.hpp"
#include "../mwworld/class.hpp"
#include "WorldController.hpp"
#include "CellController.hpp"
#include "Main.hpp"
#include "LocalPlayer.hpp"
mwmp::WorldController::WorldController()
mwmp::CellController::CellController()
{
}
mwmp::WorldController::~WorldController()
mwmp::CellController::~CellController()
{
}
int mwmp::WorldController::getCellSize() const
int mwmp::CellController::getCellSize() const
{
return 8192;
}
MWWorld::CellStore *mwmp::WorldController::getCell(const ESM::Cell& cell)
MWWorld::CellStore *mwmp::CellController::getCell(const ESM::Cell& cell)
{
MWWorld::CellStore *cellStore;
@ -47,7 +46,7 @@ MWWorld::CellStore *mwmp::WorldController::getCell(const ESM::Cell& cell)
}
void mwmp::WorldController::openContainer(const MWWorld::Ptr &container, bool loot)
void mwmp::CellController::openContainer(const MWWorld::Ptr &container, bool loot)
{
// Record this as the player's current open container
mwmp::Main::get().getLocalPlayer()->storeCurrentContainer(container, loot);
@ -70,7 +69,7 @@ void mwmp::WorldController::openContainer(const MWWorld::Ptr &container, bool lo
}
void mwmp::WorldController::closeContainer(const MWWorld::Ptr &container)
void mwmp::CellController::closeContainer(const MWWorld::Ptr &container)
{
mwmp::Main::get().getLocalPlayer()->clearCurrentContainer();

@ -1,16 +1,16 @@
#ifndef OPENMW_WORLDCONTROLLER_HPP
#define OPENMW_WORLDCONTROLLER_HPP
#ifndef OPENMW_CELLCONTROLLER_HPP
#define OPENMW_CELLCONTROLLER_HPP
#include "../mwworld/cellstore.hpp"
namespace mwmp
{
class WorldController
class CellController
{
public:
WorldController();
~WorldController();
CellController();
~CellController();
int getCellSize() const;
@ -21,4 +21,4 @@ namespace mwmp
};
}
#endif //OPENMW_WORLDCONTROLLER_HPP
#endif //OPENMW_CELLCONTROLLER_HPP

@ -26,7 +26,7 @@
#include "Main.hpp"
#include "GUIController.hpp"
#include "WorldController.hpp"
#include "CellController.hpp"
#include "../mwworld/inventorystore.hpp"
#include <boost/algorithm/clamp.hpp>
@ -84,7 +84,7 @@ void Players::createPlayer(RakNet::RakNetGUID guid)
// Temporarily spawn or move player to the center of exterior 0,0 whenever setting base info
ESM::Position spawnPos;
spawnPos.pos[0] = spawnPos.pos[1] = Main::get().getWorldController()->getCellSize() / 2;
spawnPos.pos[0] = spawnPos.pos[1] = Main::get().getCellController()->getCellSize() / 2;
spawnPos.pos[2] = 0;
MWWorld::CellStore *cellStore = world->getExterior(0, 0);
@ -152,7 +152,7 @@ void Players::disconnectPlayer(RakNet::RakNetGUID guid)
// Move player to exterior 0,0
ESM::Position newPos;
newPos.pos[0] = newPos.pos[1] = Main::get().getWorldController()->getCellSize() / 2;
newPos.pos[0] = newPos.pos[1] = Main::get().getCellController()->getCellSize() / 2;
newPos.pos[2] = 0;
MWWorld::CellStore *cellStore = world->getExterior(0, 0);

@ -28,7 +28,7 @@
#include "LocalPlayer.hpp"
#include "Networking.hpp"
#include "WorldController.hpp"
#include "CellController.hpp"
#include "Main.hpp"
using namespace mwmp;
@ -668,7 +668,7 @@ void LocalPlayer::addJournalItems()
if (journalItem.type == JournalItem::ENTRY)
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(journalItem.actorCell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(journalItem.actorCell);
if (!ptrCellStore) continue;

@ -31,7 +31,7 @@
#include "LocalPlayer.hpp"
#include "DedicatedPlayer.hpp"
#include "GUIController.hpp"
#include "WorldController.hpp"
#include "CellController.hpp"
using namespace mwmp;
using namespace std;
@ -69,7 +69,7 @@ Main::Main()
mNetworking = new Networking();
mLocalPlayer = new LocalPlayer();
mGUIController = new GUIController();
mWorldController = new WorldController();
mCellController = new CellController();
//mLocalPlayer->CharGen(0, 4);
server = "mp.tes3mp.com";
@ -208,7 +208,9 @@ void Main::updateWorld(float dt) const
get().getGUIController()->setChatVisible(true);
}
else
{
mLocalPlayer->update();
}
}
const Main &Main::get()
@ -232,9 +234,9 @@ GUIController *Main::getGUIController() const
return mGUIController;
}
WorldController *Main::getWorldController() const
CellController *Main::getCellController() const
{
return mWorldController;
return mCellController;
}
void Main::pressedKey(int key)

@ -4,7 +4,7 @@
namespace mwmp
{
class WorldController;
class CellController;
class GUIController;
class LocalPlayer;
class Networking;
@ -29,7 +29,7 @@ namespace mwmp
Networking *getNetworking() const;
LocalPlayer *getLocalPlayer() const;
GUIController *getGUIController() const;
WorldController *getWorldController() const;
CellController *getCellController() const;
void updateWorld(float dt) const;
@ -45,7 +45,7 @@ namespace mwmp
LocalPlayer *mLocalPlayer;
GUIController *mGUIController;
WorldController *mWorldController;
CellController *mCellController;
std::string server;
unsigned short port;
};

@ -29,7 +29,7 @@
#include "DedicatedPlayer.hpp"
#include "LocalPlayer.hpp"
#include "GUIController.hpp"
#include "WorldController.hpp"
#include "CellController.hpp"
#include "Main.hpp"
using namespace std;
@ -842,7 +842,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
{
case ID_ACTOR_LIST:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -857,6 +857,10 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_ACTOR_AUTHORITY:
{
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received ID_ACTOR_AUTHORITY about %s", worldEvent.cell.getDescription().c_str());
break;
}
@ -867,7 +871,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_CONTAINER:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -885,7 +889,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_OBJECT_PLACE:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -896,7 +900,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_OBJECT_DELETE:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -907,7 +911,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_OBJECT_LOCK:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -918,7 +922,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_OBJECT_UNLOCK:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -929,7 +933,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_OBJECT_SCALE:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -940,7 +944,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_OBJECT_MOVE:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -951,7 +955,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_OBJECT_ROTATE:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -962,7 +966,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_OBJECT_ANIM_PLAY:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -973,7 +977,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_DOOR_STATE:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -984,7 +988,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_SCRIPT_LOCAL_SHORT:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;
@ -995,7 +999,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
}
case ID_SCRIPT_LOCAL_FLOAT:
{
MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(worldEvent.cell);
MWWorld::CellStore *ptrCellStore = Main::get().getCellController()->getCell(worldEvent.cell);
if (!ptrCellStore) return;

Loading…
Cancel
Save