- Timestamp:
- Dec 28, 2013, 4:08:34 PM (11 years ago)
- Branches:
- master
- Children:
- 2e63b64
- Parents:
- 8aed9c0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/server.cpp
r8aed9c0 rbcfd99a 688 688 }else { 689 689 cout << "Game name: " << g->getName() << endl; 690 p->currentGame = NULL; 691 692 // check if the player that's leaving needs to receive the 693 // LEAVE_GAME message and run thie logic below to make the player 694 // drop any flag he's carrying 695 696 /* 690 697 691 if (!p->isDead) { 698 692 WorldMap::ObjectType flagType = WorldMap::OBJECT_NONE; … … 703 697 704 698 if (flagType != WorldMap::OBJECT_NONE) { 705 addObjectToMap(flagType, p->pos.x, p->pos.y, g ameMap, mapPlayers, msgProcessor);699 addObjectToMap(flagType, p->pos.x, p->pos.y, g->getMap(), g->getPlayers(), msgProcessor); 706 700 } 707 701 } 708 */ 702 703 p->currentGame = NULL; 704 g->removePlayer(p->id); 709 705 710 706 serverMsg.type = MSG_TYPE_LEAVE_GAME; … … 712 708 strcpy(serverMsg.buffer+4, g->getName().c_str()); 713 709 broadcastMessage(msgProcessor, serverMsg, g->getPlayers()); 714 715 g->removePlayer(p->id);716 710 717 711 int numPlayers = g->getNumPlayers();
Note:
See TracChangeset
for help on using the changeset viewer.