Changeset 7031 for code/branches/presentation3/src/orxonox/infos
- Timestamp:
- May 31, 2010, 4:42:57 AM (14 years ago)
- Location:
- code/branches/presentation3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3
- Property svn:mergeinfo changed
/code/branches/dynamicmatch (added) merged: 6584,6586,6603,6686,6692,6697,6812,6848,6921,6954-6955,6959,6987
- Property svn:mergeinfo changed
-
code/branches/presentation3/src/orxonox/infos/GametypeInfo.cc
r5781 r7031 42 42 registerMemberNetworkFunction(GametypeInfo, dispatchKillMessage); 43 43 registerMemberNetworkFunction(GametypeInfo, dispatchDeathMessage); 44 registerMemberNetworkFunction(GametypeInfo, dispatchStaticMessage); 45 registerMemberNetworkFunction(GametypeInfo, dispatchFadingMessage); 44 46 45 47 GametypeInfo::GametypeInfo(BaseObject* creator) : Info(creator) … … 110 112 } 111 113 114 void GametypeInfo::sendStaticMessage(const std::string& message, unsigned int clientID) 115 { 116 if (GameMode::isMaster()) 117 { 118 if (clientID == CLIENTID_SERVER) 119 this->dispatchStaticMessage(message); 120 else 121 callMemberNetworkFunction(GametypeInfo, dispatchStaticMessage, this->getObjectID(), clientID, message); 122 } 123 } 124 125 void GametypeInfo::sendFadingMessage(const std::string& message, unsigned int clientID) 126 { 127 if (GameMode::isMaster()) 128 { 129 if (clientID == CLIENTID_SERVER) 130 this->dispatchFadingMessage(message); 131 else 132 callMemberNetworkFunction(GametypeInfo, dispatchFadingMessage, this->getObjectID(), clientID, message); 133 } 134 } 135 112 136 void GametypeInfo::dispatchAnnounceMessage(const std::string& message) 113 137 { … … 127 151 it->deathmessage(this, message); 128 152 } 153 154 void GametypeInfo::dispatchStaticMessage(const std::string& message) 155 { 156 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) 157 it->staticmessage(this, message); 158 } 159 160 void GametypeInfo::dispatchFadingMessage(const std::string& message) 161 { 162 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) 163 it->fadingmessage(this, message); 164 } 129 165 } -
code/branches/presentation3/src/orxonox/infos/GametypeInfo.h
r5781 r7031 64 64 void sendKillMessage(const std::string& message, unsigned int clientID); 65 65 void sendDeathMessage(const std::string& message, unsigned int clientID); 66 void sendStaticMessage(const std::string& message, unsigned int clientID); 67 void sendFadingMessage(const std::string& message, unsigned int clientID); 66 68 67 69 void dispatchAnnounceMessage(const std::string& message); 68 70 void dispatchKillMessage(const std::string& message); 69 71 void dispatchDeathMessage(const std::string& message); 72 void dispatchStaticMessage(const std::string& message); 73 void dispatchFadingMessage(const std::string& message); 70 74 71 75 private:
Note: See TracChangeset
for help on using the changeset viewer.