[Client] Fix typo

0.6.1
Koncord 8 years ago
parent 740bfea0b2
commit f0805ca6f7

@ -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 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 # Main executable

@ -3,18 +3,18 @@
// //
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include "WorldProcesssor.hpp" #include "WorldProcessor.hpp"
#include "Main.hpp" #include "Main.hpp"
#include "Networking.hpp" #include "Networking.hpp"
using namespace mwmp; using namespace mwmp;
WorldProcesssor::processors_t WorldProcesssor::processors; WorldProcessor::processors_t WorldProcessor::processors;
RakNet::RakNetGUID WorldProcesssor::guid; RakNet::RakNetGUID WorldProcessor::guid;
RakNet::SystemAddress WorldProcesssor::serverAddr; RakNet::SystemAddress WorldProcessor::serverAddr;
bool WorldProcesssor::request; 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); RakNet::BitStream bsIn(&packet.data[1], packet.length, false);
bsIn.Read(guid); bsIn.Read(guid);
@ -43,7 +43,7 @@ bool WorldProcesssor::Process(RakNet::Packet &packet, BaseEvent &event)
return false; return false;
} }
void WorldProcesssor::AddProcessor(mwmp::WorldProcesssor *processor) void WorldProcessor::AddProcessor(mwmp::WorldProcessor *processor)
{ {
BOOST_FOREACH(processors_t::value_type &p, processors) 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 " + throw std::logic_error("processor " + p.second->strPacketID + " already registered. Check " +
processor->className + " and " + p.second->className); processor->className + " and " + p.second->className);
} }
processors.insert(processors_t::value_type(processor->GetPacketID(), boost::shared_ptr<WorldProcesssor>(processor))); processors.insert(processors_t::value_type(processor->GetPacketID(), boost::shared_ptr<WorldProcessor>(processor)));
} }
LocalPlayer *WorldProcesssor::getLocalPlayer() LocalPlayer *WorldProcessor::getLocalPlayer()
{ {
return Main::get().getLocalPlayer(); return Main::get().getLocalPlayer();
} }

@ -12,24 +12,25 @@
#include <components/openmw-mp/NetworkMessages.hpp> #include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Base/BasePacketProcessor.hpp> #include <components/openmw-mp/Base/BasePacketProcessor.hpp>
#include <components/openmw-mp/Packets/World/WorldPacket.hpp> #include <components/openmw-mp/Packets/World/WorldPacket.hpp>
#include "WorldEvent.hpp"
#include "LocalPlayer.hpp" #include "LocalPlayer.hpp"
#include "DedicatedPlayer.hpp" #include "DedicatedPlayer.hpp"
namespace mwmp namespace mwmp
{ {
class WorldProcesssor : public BasePacketProcessor class WorldProcessor : public BasePacketProcessor
{ {
public: 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 bool Process(RakNet::Packet &packet, WorldEvent &event);
static void AddProcessor(WorldProcesssor *processor); static void AddProcessor(WorldProcessor *processor);
static void SetServerAddr(RakNet::SystemAddress addr) static void SetServerAddr(RakNet::SystemAddress addr)
{ {
serverAddr = addr; serverAddr = addr;
} }
typedef boost::unordered_map<unsigned char, boost::shared_ptr<WorldProcesssor> > processors_t; typedef boost::unordered_map<unsigned char, boost::shared_ptr<WorldProcessor> > processors_t;
protected: protected:
inline bool isRequest() inline bool isRequest()
Loading…
Cancel
Save