forked from mirror/openmw-tes3mp
[Server] Make coding style consistent
This commit is contained in:
parent
106c9edead
commit
5ff40c5563
3 changed files with 14 additions and 14 deletions
|
@ -146,7 +146,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
}
|
||||
|
||||
|
||||
if(!PlayerProcessor::Process(*packet))
|
||||
if (!PlayerProcessor::Process(*packet))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled PlayerPacket with identifier %i has arrived", packet->data[0]);
|
||||
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
|
|||
baseEvent.objectChanges.objects.clear();
|
||||
baseEvent.guid = packet->guid;
|
||||
|
||||
if(!WorldProcessor::Process(*packet))
|
||||
if (!WorldProcessor::Process(*packet))
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled WorldPacket with identifier %i has arrived", packet->data[0]);
|
||||
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void Networking::update(RakNet::Packet *packet)
|
|||
|
||||
if (player == 0)
|
||||
{
|
||||
if(packet->data[0] == ID_GAME_PREINIT)
|
||||
if (packet->data[0] == ID_GAME_PREINIT)
|
||||
{
|
||||
DEBUG_PRINTF("ID_GAME_PREINIT");
|
||||
PacketPreInit::PluginContainer plugins;
|
||||
|
@ -188,7 +188,7 @@ void Networking::update(RakNet::Packet *packet)
|
|||
packetPreInit.setChecksums(&plugins);
|
||||
packetPreInit.Read();
|
||||
|
||||
for(auto plugin : plugins)
|
||||
for (auto plugin : plugins)
|
||||
{
|
||||
LOG_APPEND(Log::LOG_VERBOSE, "- %X\t%s", plugin.second, plugin.first.c_str());
|
||||
}
|
||||
|
|
|
@ -12,9 +12,9 @@ PlayerProcessor::processors_t PlayerProcessor::processors;
|
|||
|
||||
void PlayerProcessor::AddProcessor(PlayerProcessor *processor) noexcept
|
||||
{
|
||||
for(auto &p : processors)
|
||||
for (auto &p : processors)
|
||||
{
|
||||
if(processor->packetID == p.first)
|
||||
if (processor->packetID == p.first)
|
||||
throw std::logic_error("processor " + p.second->strPacketID + " already registered. Check " +
|
||||
processor->className + " and " + p.second->className);
|
||||
}
|
||||
|
@ -24,15 +24,15 @@ void PlayerProcessor::AddProcessor(PlayerProcessor *processor) noexcept
|
|||
bool PlayerProcessor::Process(RakNet::Packet &packet) noexcept
|
||||
{
|
||||
//BOOST_FOREACH(processors_t::value_type &processor, processors)
|
||||
for(auto &processor : processors)
|
||||
for (auto &processor : processors)
|
||||
{
|
||||
if(processor.first == packet.data[0])
|
||||
if (processor.first == packet.data[0])
|
||||
{
|
||||
Player *player = Players::getPlayer(packet.guid);
|
||||
PlayerPacket *myPacket = Networking::get().getPlayerController()->GetPacket(packet.data[0]);
|
||||
myPacket->setPlayer(player);
|
||||
|
||||
if(!processor.second->avoidReading)
|
||||
if (!processor.second->avoidReading)
|
||||
myPacket->Read();
|
||||
|
||||
processor.second->Do(*myPacket, *player);
|
||||
|
|
|
@ -16,9 +16,9 @@ void WorldProcessor::Do(WorldPacket &packet, Player &player, BaseEvent &event)
|
|||
|
||||
void WorldProcessor::AddProcessor(mwmp::WorldProcessor *processor) noexcept
|
||||
{
|
||||
for(auto &p : processors)
|
||||
for (auto &p : processors)
|
||||
{
|
||||
if(processor->packetID == p.first)
|
||||
if (processor->packetID == p.first)
|
||||
throw std::logic_error("processor " + p.second->strPacketID + " already registered. Check " +
|
||||
processor->className + " and " + p.second->className);
|
||||
}
|
||||
|
@ -31,9 +31,9 @@ bool WorldProcessor::Process(RakNet::Packet &packet) noexcept
|
|||
baseEvent.cell.blank();
|
||||
baseEvent.objectChanges.objects.clear();
|
||||
baseEvent.guid = packet.guid;
|
||||
for(auto &processor : processors)
|
||||
for (auto &processor : processors)
|
||||
{
|
||||
if(processor.first == packet.data[0])
|
||||
if (processor.first == packet.data[0])
|
||||
{
|
||||
Player *player = Players::getPlayer(packet.guid);
|
||||
WorldPacket *myPacket = Networking::get().getWorldController()->GetPacket(packet.data[0]);
|
||||
|
@ -42,7 +42,7 @@ bool WorldProcessor::Process(RakNet::Packet &packet) noexcept
|
|||
player->npc.mName.c_str());
|
||||
myPacket->setEvent(&baseEvent);
|
||||
|
||||
if(!processor.second->avoidReading)
|
||||
if (!processor.second->avoidReading)
|
||||
myPacket->Read();
|
||||
|
||||
processor.second->Do(*myPacket, *player, baseEvent);
|
||||
|
|
Loading…
Reference in a new issue