Join request is sent, but I need to plan the next section out in detail

This commit is contained in:
Kayne Ruse
2013-05-22 17:31:13 +10:00
parent 66f54dca0b
commit cce1a874bf
8 changed files with 68 additions and 50 deletions
+11 -4
View File
@@ -17,7 +17,8 @@ enum class PacketList {
JOINCONFIRM,
DISCONNECT,
//player controls
//information control
SYNCHRONIZE,
NEWPLAYER,
DELETEPLAYER,
MOVEMENT,
@@ -29,11 +30,12 @@ enum class PacketList {
struct Ping {
PacketList type = PacketList::PING;
char metadata[PACKET_STRING_SIZE];
};
struct Pong {
PacketList type = PacketList::PONG;
char serverName[PACKET_STRING_SIZE];
char metadata[PACKET_STRING_SIZE];
};
struct JoinRequest {
@@ -52,9 +54,13 @@ struct Disconnect {
};
//-------------------------
//player controls
//information control
//-------------------------
struct Synchronize {
PacketList type = PacketList::SYNCHRONIZE;
};
struct NewPlayer {
PacketList type = PacketList::NEWPLAYER;
int playerID;
@@ -92,7 +98,8 @@ union Packet {
JoinConfirm joinConfirm;
Disconnect disconnect;
//player controls
//information control
Synchronize synchronize;
NewPlayer newPlayer;
DeletePlayer deletePlayer;
Movement movement;