- Timestamp:
- Nov 21, 2015, 7:05:53 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.cc
r10768 r10821 74 74 this->gameEnded_ = true; 75 75 76 for ( std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)77 { 78 if ( it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)76 for (auto & elem : this->teamnumbers_) 77 { 78 if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 79 79 continue; 80 80 81 if ( it->second == attacker_)82 this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());81 if (elem.second == attacker_) 82 this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID()); 83 83 else 84 this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());84 this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID()); 85 85 } 86 86 } … … 155 155 ChatManager::message(message); 156 156 157 for ( std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)158 { 159 if ( it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)157 for (auto & elem : this->teamnumbers_) 158 { 159 if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 160 160 continue; 161 161 162 if ( it->second == 1)163 this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());162 if (elem.second == 1) 163 this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID()); 164 164 else 165 this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());165 this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID()); 166 166 } 167 167 }
Note: See TracChangeset
for help on using the changeset viewer.