[Client] Remove unecessary calls

pull/176/merge
Koncord 8 years ago
parent 6969742ef0
commit 1db30a65cb

@ -249,24 +249,6 @@ void Networking::preInit(std::vector<std::string> &content, Files::Collections &
}
}
void Networking::processPlayerPacket(RakNet::Packet *packet)
{
if(!PlayerProcessor::Process(*packet))
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled PlayerPacket with identifier %i has arrived", packet->data[0]);
}
void Networking::processActorPacket(RakNet::Packet *packet)
{
if (!ActorProcessor::Process(*packet, actorList))
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled ActorPacket with identifier %i has arrived", packet->data[0]);
}
void Networking::processWorldPacket(RakNet::Packet *packet)
{
if (!WorldProcessor::Process(*packet, worldEvent))
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled WorldPacket with identifier %i has arrived", packet->data[0]);
}
void Networking::receiveMessage(RakNet::Packet *packet)
{
if (packet->length < 2)
@ -274,15 +256,18 @@ void Networking::receiveMessage(RakNet::Packet *packet)
if (playerPacketController.ContainsPacket(packet->data[0]))
{
processPlayerPacket(packet);
if(!PlayerProcessor::Process(*packet))
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled PlayerPacket with identifier %i has arrived", packet->data[0]);
}
else if (actorPacketController.ContainsPacket(packet->data[0]))
{
processActorPacket(packet);
if (!ActorProcessor::Process(*packet, actorList))
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled ActorPacket with identifier %i has arrived", packet->data[0]);
}
else if (worldPacketController.ContainsPacket(packet->data[0]))
{
processWorldPacket(packet);
if (!WorldProcessor::Process(*packet, worldEvent))
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled WorldPacket with identifier %i has arrived", packet->data[0]);
}
}

@ -62,10 +62,6 @@ namespace mwmp
ActorList actorList;
WorldEvent worldEvent;
void processPlayerPacket(RakNet::Packet *packet);
void processActorPacket(RakNet::Packet *packet);
void processWorldPacket(RakNet::Packet *packet);
void receiveMessage(RakNet::Packet *packet);
void preInit(std::vector<std::string> &content, Files::Collections &collections);

Loading…
Cancel
Save