Merge branch 'Networking' of github.com:teamfisk/TacticalZ into Networking
# Conflicts: # include/Engine/Network/Client.h # src/Engine/Network/Client.cpp
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
#include <string>
|
||||
#include <ctime>
|
||||
|
||||
#include <boost/thread.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <glm/common.hpp>
|
||||
#include <GLFW/glfw3.h> // For input event
|
||||
|
||||
@@ -34,6 +32,7 @@ private:
|
||||
int CreateMessage(MessageType type, std::string message, char* data);
|
||||
void Connect();
|
||||
void Disconnect();
|
||||
void Ping();
|
||||
void MoveMessageHead(char*& data, size_t& length, size_t stepSize);
|
||||
void ParseMessageType(char* data, size_t length);
|
||||
void ParseEventMessage(char* data, size_t length);
|
||||
@@ -50,13 +49,11 @@ private:
|
||||
|
||||
World* m_World;
|
||||
int m_PlayerID = -1;
|
||||
char m_GameBoard[BOARDSIZE][BOARDSIZE];
|
||||
glm::vec2 m_PlayerPositions[MAXCONNECTIONS];
|
||||
//std::string m_PlayerNames[MAXCONNECTIONS];
|
||||
PlayerDefinition m_PlayerDefinitions[MAXCONNECTIONS];
|
||||
std::clock_t m_StartPingTime;
|
||||
double m_DurationOfPingTime;
|
||||
bool m_ShouldDrawGameBoard = true;
|
||||
std::string m_PlayerName;
|
||||
bool m_ThreadIsRunning = true;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <string>
|
||||
|
||||
struct PlayerDefinition {
|
||||
unsigned int EntityID = -1;
|
||||
int EntityID = -1;
|
||||
std::string Name = "";
|
||||
boost::asio::ip::udp::endpoint Endpoint;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user