I can't progress until I add the address information to the Packet struct
This commit is contained in:
@@ -168,5 +168,13 @@ void ServerApplication::Broadcast(BroadcastRequest& bcast) {
|
||||
}
|
||||
|
||||
void ServerApplication::HandleConnection(JoinRequest& request) {
|
||||
cout << "request received" << endl;
|
||||
//create the containers
|
||||
ClientData client = { clientTicker++ };
|
||||
PlayerData player = { playerTicker++ };
|
||||
|
||||
//link the containers
|
||||
client.playerIndex = player.index;
|
||||
player.clientIndex = client.index;
|
||||
|
||||
//??? oh fuck
|
||||
}
|
||||
@@ -61,6 +61,9 @@ private:
|
||||
std::map<int, PlayerData> players;
|
||||
|
||||
bool running = false;
|
||||
|
||||
int clientTicker = 0;
|
||||
int playerTicker = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user