Changeset 3ef8cf4 in network-game for server/server.cpp
- Timestamp:
- Sep 27, 2013, 8:05:35 PM (11 years ago)
- Branches:
- master
- Children:
- 0693e25
- Parents:
- ab8fd40
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/server.cpp
rab8fd40 r3ef8cf4 941 941 // check if this game already exists 942 942 if (mapGames.find(gameName) != mapGames.end()) { 943 cout << "Error: Game already exists" << endl; 943 944 serverMsg.type = MSG_TYPE_JOIN_GAME_FAILURE; 944 945 broadcastResponse = false; … … 967 968 // check if this game already exists 968 969 if (mapGames.find(gameName) == mapGames.end()) { 970 cout << "Error: Game does not exist" << endl; 969 971 serverMsg.type = MSG_TYPE_JOIN_GAME_FAILURE; 970 972 broadcastResponse = false; … … 1007 1009 1008 1010 cout << "Game name: " << g->getName() << endl; 1009 //p->currentGame = NULL; 1011 p->currentGame = NULL; 1012 g->removePlayer(p->id); 1010 1013 1011 1014 // broadcast a messsage to other players so they know someone left the game
Note:
See TracChangeset
for help on using the changeset viewer.