Changeset 1953 for code/branches/objecthierarchy/src/network/Host.cc
- Timestamp:
- Oct 19, 2008, 9:50:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/network/Host.cc
r1907 r1953 32 32 #include "core/ConsoleCommand.h" 33 33 #include "packet/Packet.h" 34 #include "ChatListener.h" 34 35 35 36 namespace network { … … 38 39 39 40 Host *Host::instance_=0; 40 41 41 42 /** 42 43 * @brief Constructor: assures that only one reference will be created and sets the pointer … … 90 91 * @return playerID 91 92 */ 92 unsigned int Host::getPlayerID(){ 93 unsigned int Host::getPlayerID(){ 93 94 if(!instance_) 94 95 return 0; … … 96 97 } 97 98 98 bool Host::Chat( std::stringmessage){99 bool Host::Chat(const std::string& message){ 99 100 if(!instance_) 100 101 return false; … … 102 103 } 103 104 104 bool Host::incomingChat(std::string message, unsigned int playerID){ 105 bool Host::Broadcast(const std::string& message){ 106 if(!instance_) 107 return false; 108 return instance_->broadcast(message); 109 } 110 111 bool Host::incomingChat(const std::string& message, unsigned int playerID){ 112 for (orxonox::ObjectList<ChatListener>::iterator it = orxonox::ObjectList<ChatListener>::begin(); it != orxonox::ObjectList<ChatListener>::end(); ++it) 113 it->incomingChat(message, playerID); 114 105 115 return instance_->processChat(message, playerID); 106 116 }
Note: See TracChangeset
for help on using the changeset viewer.