Added a class that client and server inherits from.

Class and server now share the same pointer i game.
You are now able to start a client and a server on the same computer.
This commit is contained in:
Jocke
2015-12-16 14:56:53 +01:00
parent a2d55feed1
commit 58a9d38e26
7 changed files with 64 additions and 23 deletions
+3 -3
View File
@@ -21,6 +21,7 @@
// Network
#include <boost/thread.hpp>
#include "Network/Network.h"
#include "Network/Server.h"
#include "Network/Client.h"
@@ -50,9 +51,8 @@ private:
// Network methods
void NetworkFunction();
Client m_Client;
Server m_Server;
bool m_IsClient = false;
Network* m_ClientOrServer;
bool m_IsClientOrServer = false;
EventRelay<Game, Events::InputCommand> m_EInputCommand;
bool debugOnInputCommand(const Events::InputCommand& e);