Changeset 8829 for code/branches/output/src/modules
- Timestamp:
- Aug 7, 2011, 3:11:16 PM (14 years ago)
- Location:
- code/branches/output/src/modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/modules/gametypes/RaceCheckPoint.cc
r8822 r8829 32 32 #include "core/CoreIncludes.h" 33 33 #include "core/XMLPort.h" 34 #include " network/Host.h"34 #include "chat/ChatManager.h" 35 35 #include "SpaceRace.h" 36 36 … … 112 112 + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1); 113 113 const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage(message); 114 Host::Broadcast(message);114 ChatManager::message(message); 115 115 } 116 116 } -
code/branches/output/src/modules/gametypes/SpaceRace.cc
r8822 r8829 30 30 31 31 #include "core/CoreIncludes.h" 32 #include " network/Host.h"33 #include <util/Clock.h>34 #include <util/Math.h>32 #include "chat/ChatManager.h" 33 #include "util/Clock.h" 34 #include "util/Math.h" 35 35 #include "util/Convert.h" 36 36 … … 60 60 + " before the time limit. You lose!"; 61 61 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 62 Host::Broadcast(message);62 ChatManager::message(message); 63 63 } 64 64 else … … 70 70 + "." + multi_cast<std::string>(ms) + " seconds."; 71 71 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 72 Host::Broadcast(message);72 ChatManager::message(message); 73 73 /* 74 74 float time = this->clock_.getSecondsPrecise(); … … 86 86 87 87 std::string message("The match has started! Reach the check points as quickly as possible!"); 88 Host::Broadcast(message);88 ChatManager::message(message); 89 89 } 90 90 … … 99 99 + " seconds."; 100 100 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 101 Host::Broadcast(message);101 ChatManager::message(message); 102 102 } 103 103 -
code/branches/output/src/modules/overlays/hud/ChatOverlay.cc
r8826 r8829 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 = message; 72 73 if (senderID != NETWORK_PEER_ID_UNKNOWN) 74 { 75 PlayerInfo* player = PlayerManager::getInstance().getClient(senderID); 76 if (player) 77 text = player->getName() + ": " + message; 78 } 79 80 this->messages_.push_back(multi_cast<Ogre::DisplayString>(text)); 71 this->messages_.push_back(multi_cast<Ogre::DisplayString>(message)); 81 72 82 73 Timer* timer = new Timer(); -
code/branches/output/src/modules/overlays/hud/ChatOverlay.h
r6417 r8829 35 35 #include <OgreOverlayElement.h> 36 36 37 #include " network/ChatListener.h"37 #include "chat/ChatListener.h" 38 38 #include "overlays/OverlayText.h" 39 39 … … 49 49 50 50 protected: 51 virtual void incomingChat(const std::string& message, unsigned int senderID);51 virtual void incomingChat(const std::string& message, const std::string& name); 52 52 53 53 std::list<Ogre::DisplayString> messages_;
Note: See TracChangeset
for help on using the changeset viewer.