Added logic to go from spectator to player.

This commit is contained in:
Jocke
2016-01-20 17:41:16 +01:00
parent 00588b07c5
commit cd67253173
5 changed files with 55 additions and 15 deletions
+1
View File
@@ -82,6 +82,7 @@ private:
bool hasServerTimedOut();
EntityID createPlayer();
void sendInputCommands();
void becomePlayer();
// Mapping Logic
// Returns if local EntityID exist in map
bool clientServerMapsHasEntity(EntityID clientEntityID);
+2 -1
View File
@@ -13,7 +13,8 @@ enum class MessageType
Snapshot,
OnInputCommand,
OnPlayerDamage,
PlayerConnected
PlayerConnected,
BecomePlayer
};
#endif
+1 -1
View File
@@ -71,7 +71,7 @@ private:
void parseClientPing();
void parseServerPing();
void identifyPacketLoss();
EntityID createPlayer();
void createPlayer();
int GetPlayerIDFromEndpoint(boost::asio::ip::udp::endpoint endpoint);
// Debug event
EventRelay<Server, Events::InputCommand> m_EInputCommand;