From f0805ca6f7a2128d70e0990484ed1ff483b2c78d Mon Sep 17 00:00:00 2001 From: Koncord Date: Tue, 18 Apr 2017 11:35:50 +0800 Subject: [PATCH] [Client] Fix typo --- apps/openmw/CMakeLists.txt | 2 +- ...{WorldProcesssor.cpp => WorldProcessor.cpp} | 18 +++++++++--------- ...{WorldProcesssor.hpp => WorldProcessor.hpp} | 11 ++++++----- 3 files changed, 16 insertions(+), 15 deletions(-) rename apps/openmw/mwmp/{WorldProcesssor.cpp => WorldProcessor.cpp} (73%) rename apps/openmw/mwmp/{WorldProcesssor.hpp => WorldProcessor.hpp} (76%) diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 520b9ec9e..de33bb2bb 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -97,7 +97,7 @@ add_openmw_dir (mwbase ) add_openmw_dir (mwmp Main Networking LocalPlayer DedicatedPlayer LocalActor DedicatedActor ActorList WorldEvent Cell CellController MechanicsHelper GUIChat GUILogin - GUIController PlayerMarkerCollection GUIDialogList WorldController PlayerProcessor WorldProcesssor ProcessorInitializer) + GUIController PlayerMarkerCollection GUIDialogList WorldController PlayerProcessor WorldProcessor ProcessorInitializer) # Main executable diff --git a/apps/openmw/mwmp/WorldProcesssor.cpp b/apps/openmw/mwmp/WorldProcessor.cpp similarity index 73% rename from apps/openmw/mwmp/WorldProcesssor.cpp rename to apps/openmw/mwmp/WorldProcessor.cpp index fd0aeef2b..a70a89e1e 100644 --- a/apps/openmw/mwmp/WorldProcesssor.cpp +++ b/apps/openmw/mwmp/WorldProcessor.cpp @@ -3,18 +3,18 @@ // #include -#include "WorldProcesssor.hpp" +#include "WorldProcessor.hpp" #include "Main.hpp" #include "Networking.hpp" using namespace mwmp; -WorldProcesssor::processors_t WorldProcesssor::processors; -RakNet::RakNetGUID WorldProcesssor::guid; -RakNet::SystemAddress WorldProcesssor::serverAddr; -bool WorldProcesssor::request; +WorldProcessor::processors_t WorldProcessor::processors; +RakNet::RakNetGUID WorldProcessor::guid; +RakNet::SystemAddress WorldProcessor::serverAddr; +bool WorldProcessor::request; -bool WorldProcesssor::Process(RakNet::Packet &packet, BaseEvent &event) +bool WorldProcessor::Process(RakNet::Packet &packet, WorldEvent &event) { RakNet::BitStream bsIn(&packet.data[1], packet.length, false); bsIn.Read(guid); @@ -43,7 +43,7 @@ bool WorldProcesssor::Process(RakNet::Packet &packet, BaseEvent &event) return false; } -void WorldProcesssor::AddProcessor(mwmp::WorldProcesssor *processor) +void WorldProcessor::AddProcessor(mwmp::WorldProcessor *processor) { BOOST_FOREACH(processors_t::value_type &p, processors) { @@ -51,10 +51,10 @@ void WorldProcesssor::AddProcessor(mwmp::WorldProcesssor *processor) throw std::logic_error("processor " + p.second->strPacketID + " already registered. Check " + processor->className + " and " + p.second->className); } - processors.insert(processors_t::value_type(processor->GetPacketID(), boost::shared_ptr(processor))); + processors.insert(processors_t::value_type(processor->GetPacketID(), boost::shared_ptr(processor))); } -LocalPlayer *WorldProcesssor::getLocalPlayer() +LocalPlayer *WorldProcessor::getLocalPlayer() { return Main::get().getLocalPlayer(); } diff --git a/apps/openmw/mwmp/WorldProcesssor.hpp b/apps/openmw/mwmp/WorldProcessor.hpp similarity index 76% rename from apps/openmw/mwmp/WorldProcesssor.hpp rename to apps/openmw/mwmp/WorldProcessor.hpp index 1e0ff0de3..8a2f0ae55 100644 --- a/apps/openmw/mwmp/WorldProcesssor.hpp +++ b/apps/openmw/mwmp/WorldProcessor.hpp @@ -12,24 +12,25 @@ #include #include #include +#include "WorldEvent.hpp" #include "LocalPlayer.hpp" #include "DedicatedPlayer.hpp" namespace mwmp { - class WorldProcesssor : public BasePacketProcessor + class WorldProcessor : public BasePacketProcessor { public: - virtual void Do(WorldPacket &packet, BaseEvent &event) = 0; + virtual void Do(WorldPacket &packet, WorldEvent &event) = 0; - static bool Process(RakNet::Packet &packet, BaseEvent &event); - static void AddProcessor(WorldProcesssor *processor); + static bool Process(RakNet::Packet &packet, WorldEvent &event); + static void AddProcessor(WorldProcessor *processor); static void SetServerAddr(RakNet::SystemAddress addr) { serverAddr = addr; } - typedef boost::unordered_map > processors_t; + typedef boost::unordered_map > processors_t; protected: inline bool isRequest()