Synchronization works
This commit is contained in:
+4
-12
@@ -90,9 +90,10 @@ struct Disconnect {
|
||||
|
||||
struct Synchronize {
|
||||
Metadata meta;
|
||||
int clientIndex;
|
||||
};
|
||||
|
||||
struct PlayerNew {
|
||||
struct PlayerData {
|
||||
Metadata meta;
|
||||
int playerIndex;
|
||||
int clientIndex;
|
||||
@@ -109,14 +110,6 @@ struct PlayerDelete {
|
||||
int clientIndex;
|
||||
};
|
||||
|
||||
struct PlayerUpdate {
|
||||
Metadata meta;
|
||||
int playerIndex;
|
||||
int clientIndex;
|
||||
Vector2 position;
|
||||
Vector2 motion;
|
||||
};
|
||||
|
||||
union Packet {
|
||||
Packet() {
|
||||
meta.type = Type::NONE;
|
||||
@@ -133,11 +126,10 @@ union Packet {
|
||||
JoinResponse joinResponse;
|
||||
Disconnect disconnect;
|
||||
|
||||
Synchronize sync;
|
||||
Synchronize synchronize;
|
||||
|
||||
PlayerNew playerNew;
|
||||
PlayerData playerData;
|
||||
PlayerDelete playerDelete;
|
||||
PlayerUpdate playerUpdate;
|
||||
|
||||
#ifdef DEBUG
|
||||
char buffer[1024];
|
||||
|
||||
Reference in New Issue
Block a user