Changeset 7163 for code/trunk/src/orxonox/infos
- Timestamp:
- Aug 11, 2010, 8:55:13 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/infos/GametypeInfo.cc
r5781 r7163 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, const ColourValue& colour) 115 { 116 if (GameMode::isMaster()) 117 { 118 if (clientID == CLIENTID_SERVER) 119 this->dispatchStaticMessage(message, colour); 120 else 121 callMemberNetworkFunction(GametypeInfo, dispatchStaticMessage, this->getObjectID(), clientID, message, colour); 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, const ColourValue& colour) 155 { 156 for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it) 157 it->staticmessage(this, message, colour); 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/trunk/src/orxonox/infos/GametypeInfo.h
r5781 r7163 45 45 virtual ~GametypeInfo(); 46 46 47 void registerVariables();48 49 47 inline bool hasStarted() const 50 48 { return this->bStarted_; } … … 64 62 void sendKillMessage(const std::string& message, unsigned int clientID); 65 63 void sendDeathMessage(const std::string& message, unsigned int clientID); 64 void sendStaticMessage(const std::string& message, unsigned int clientID, const ColourValue& colour); 65 void sendFadingMessage(const std::string& message, unsigned int clientID); 66 66 67 67 void dispatchAnnounceMessage(const std::string& message); 68 68 void dispatchKillMessage(const std::string& message); 69 69 void dispatchDeathMessage(const std::string& message); 70 void dispatchStaticMessage(const std::string& message,const ColourValue& colour); 71 void dispatchFadingMessage(const std::string& message); 70 72 71 73 private: 74 void registerVariables(); 75 72 76 bool bStarted_; 73 77 bool bEnded_; -
code/trunk/src/orxonox/infos/HumanPlayer.h
r5781 r7163 43 43 virtual ~HumanPlayer(); 44 44 45 void registerVariables();46 45 void setConfigValues(); 47 46 … … 101 100 std::string gametypeHudTemplate_; 102 101 OverlayGroup* gametypeHud_; 102 private: 103 void registerVariables(); 103 104 }; 104 105 } -
code/trunk/src/orxonox/infos/PlayerInfo.cc
r6417 r7163 177 177 return; 178 178 179 // assert( this->temporaryControllableEntity_==0 );179 assert( this->oldControllableEntity_==0 ); 180 180 181 181 this->oldControllableEntity_ = this->controllableEntity_; … … 184 184 185 185 entity->setPlayer(this); 186 entity->setController(this->controller_); 186 187 187 188 if (this->controller_) … … 222 223 return; 223 224 225 this->controllableEntity_->setController(0); 226 224 227 this->controllableEntity_ = this->oldControllableEntity_; 225 228 this->controllableEntityID_ = this->controllableEntity_->getObjectID(); -
code/trunk/src/orxonox/infos/PlayerInfo.h
r6417 r7163 35 35 #include "core/SubclassIdentifier.h" 36 36 37 namespace orxonox 38 { 39 class _OrxonoxExport PlayerInfo : public Info 40 { 37 namespace orxonox // tolua_export 38 { // tolua_export 39 class _OrxonoxExport PlayerInfo // tolua_export 40 : public Info 41 { // tolua_export 41 42 public: 42 43 PlayerInfo(BaseObject* creator); 43 44 virtual ~PlayerInfo(); 44 45 void registerVariables();46 45 47 46 virtual void changedName(); … … 91 90 92 91 private: 92 void registerVariables(); 93 93 void networkcallback_changedcontrollableentityID(); 94 94 void networkcallback_changedgtinfoID(); … … 103 103 const GametypeInfo* gtinfo_; 104 104 unsigned int gtinfoID_; 105 }; 106 } 105 }; // tolua_export 106 } // tolua_export 107 107 108 108 #endif /* _PlayerInfo_H__ */
Note: See TracChangeset
for help on using the changeset viewer.