Server now broadcasts certain input commands to all other clients (for stuff like shooting)

This commit is contained in:
2016-02-09 19:37:42 +01:00
parent d5647ce89c
commit d83190290f
6 changed files with 48 additions and 22 deletions
+2
View File
@@ -48,6 +48,7 @@ private:
float snapshotInterval;
int checkTimeOutInterval = 100;
int m_NextPlayerID = 0;
std::vector<Events::InputCommand> m_InputCommandsToBroadcast;
//Timers
std::clock_t m_StartPingTime;
@@ -64,6 +65,7 @@ private:
void broadcast(Packet& packet);
void sendSnapshot();
void addChildrenToPacket(Packet& packet, EntityID entityID);
void addInputCommandsToPacket(Packet& packet);
void sendPing();
void checkForTimeOuts();
void disconnect(PlayerID playerID);