Changeset 8858 for code/trunk/src/modules/overlays/hud/ChatOverlay.cc
- Timestamp:
- Aug 23, 2011, 12:45:53 AM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 1 build 2 2 codeblocks 3 vs 3 4 dependencies
-
- Property svn:mergeinfo changed
/code/branches/output (added) merged: 8739-8740,8765,8771-8772,8774-8780,8787-8789,8794-8799,8801,8803-8812,8814,8816-8817,8820,8822,8825-8837,8840,8844,8846,8848-8850,8853-8854
- Property svn:ignore
-
code/trunk/src/modules/overlays/hud/ChatOverlay.cc
r8327 r8858 67 67 } 68 68 69 void ChatOverlay::incomingChat(const std::string& message, unsigned int senderID)69 void ChatOverlay::incomingChat(const std::string& message, const std::string& /*name*/) 70 70 { 71 std::string text; 72 73 if (senderID != NETWORK_PEER_ID_UNKNOWN) 74 { 75 std::string name = "unknown"; 76 77 PlayerInfo* player = PlayerManager::getInstance().getClient(senderID); 78 if (player) 79 name = player->getName(); 80 81 text = name + ": " + message; 82 } 83 else 84 { 85 text = message; 86 } 87 88 this->messages_.push_back(multi_cast<Ogre::DisplayString>(text)); 89 COUT(0) << "Chat: " << text << std::endl; 71 this->messages_.push_back(multi_cast<Ogre::DisplayString>(message)); 90 72 91 73 Timer* timer = new Timer(); … … 110 92 this->text_->setCaption(""); 111 93 112 for (std::list<Ogre::DisplayString>:: reverse_iterator it = this->messages_.rbegin(); it != this->messages_.rend(); ++it)94 for (std::list<Ogre::DisplayString>::iterator it = this->messages_.begin(); it != this->messages_.end(); ++it) 113 95 { 114 96 this->text_->setCaption(this->text_->getCaption() + "\n" + (*it));
Note: See TracChangeset
for help on using the changeset viewer.