- Timestamp:
- May 25, 2013, 7:32:50 PM (12 years ago)
- Branches:
- master
- Children:
- a6066e8
- Parents:
- b8cb03f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/server.cpp
rb8cb03f rdf79cfd 305 305 serverMsg.type = MSG_TYPE_PLAYER; 306 306 307 p->setAddr(from);308 307 updateUnusedId(unusedId, mapPlayers); 309 308 p->id = unusedId; 310 309 cout << "new player id: " << p->id << endl; 310 p->setAddr(from); 311 312 // choose a random team (either 0 or 1) 313 p->team = rand() % 2; 311 314 312 315 // tell the new player about all the existing players
Note:
See TracChangeset
for help on using the changeset viewer.