Changeset ea17281 in network-game for common/Game.cpp
- Timestamp:
- Jul 4, 2014, 8:09:47 PM (10 years ago)
- Branches:
- master
- Children:
- e98426d
- Parents:
- a0ce8a3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/Game.cpp
ra0ce8a3 rea17281 43 43 } 44 44 45 bool Game::addPlayer(Player* p ) {45 bool Game::addPlayer(Player* p, bool serverSide) { 46 46 if (players.find(p->getId()) == players.end()) { 47 47 players[p->getId()] = p; … … 58 58 p->hasRedFlag = false; 59 59 60 // choose a random team (either 0 or 1) 61 p->team = rand() % 2; 60 if (serverSide) { 61 // choose a random team (either 0 or 1) 62 p->team = rand() % 2; 63 } 62 64 63 65 p->currentGame = this;
Note:
See TracChangeset
for help on using the changeset viewer.