forked from mirror/openmw-tes3mp
[Server] Use CellController in Networking
This commit is contained in:
parent
8887a267c7
commit
08f78e21c1
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "Networking.hpp"
|
||||
#include "MasterClient.hpp"
|
||||
#include "Cell.hpp"
|
||||
|
||||
using namespace mwmp;
|
||||
using namespace std;
|
||||
|
@ -29,6 +30,8 @@ Networking::Networking(RakNet::RakPeerInterface *peer)
|
|||
this->peer = peer;
|
||||
players = Players::getPlayers();
|
||||
|
||||
CellController::Create();
|
||||
|
||||
playerController = new PlayerPacketController(peer);
|
||||
worldController = new WorldPacketController(peer);
|
||||
|
||||
|
@ -46,6 +49,8 @@ Networking::~Networking()
|
|||
{
|
||||
Script::Call<Script::CallbackIdentity("OnServerExit")>(false);
|
||||
|
||||
CellController::Destroy();
|
||||
|
||||
sThis = 0;
|
||||
delete playerController;
|
||||
LOG_QUIT();
|
||||
|
@ -180,6 +185,8 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
|
||||
myPacket->Read(player);
|
||||
|
||||
CellController::Get()->update(player);
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnPlayerCellState")>(player->getId());
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue