Changeset 2112 for code/branches/objecthierarchy/src/orxonox/objects/infos
- Timestamp:
- Nov 2, 2008, 12:54:17 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox/objects/infos
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/objects/infos/HumanPlayer.cc
r2072 r2112 67 67 void HumanPlayer::registerVariables() 68 68 { 69 REGISTERSTRING(this->synchronize_nick_, network::direction::toserver, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));69 REGISTERSTRING(this->synchronize_nick_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick)); 70 70 71 REGISTERDATA(this->clientID_, network::direction::toclient, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));72 REGISTERDATA(this->server_ready_, network::direction::toclient, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_ready));73 REGISTERDATA(this->client_ready_, network::direction::toserver, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_ready));71 REGISTERDATA(this->clientID_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged)); 72 REGISTERDATA(this->server_ready_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_ready)); 73 REGISTERDATA(this->client_ready_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_ready)); 74 74 } 75 75 … … 92 92 void HumanPlayer::networkcallback_clientIDchanged() 93 93 { 94 if (this->clientID_ == network::Host::getPlayerID())94 if (this->clientID_ == Host::getPlayerID()) 95 95 { 96 96 this->bLocalPlayer_ = true; … … 99 99 100 100 if (!Core::isMaster()) 101 this->setObjectMode( network::direction::bidirectional);101 this->setObjectMode(direction::bidirectional); 102 102 else 103 103 this->setName(this->nick_); … … 125 125 float HumanPlayer::getPing() const 126 126 { 127 return network::ClientInformation::findClient(this->getClientID())->getRTT();127 return ClientInformation::findClient(this->getClientID())->getRTT(); 128 128 } 129 129 130 130 float HumanPlayer::getPacketLossRatio() const 131 131 { 132 return network::ClientInformation::findClient(this->getClientID())->getPacketLoss();132 return ClientInformation::findClient(this->getClientID())->getPacketLoss(); 133 133 } 134 134 -
code/branches/objecthierarchy/src/orxonox/objects/infos/Info.cc
r2072 r2112 34 34 namespace orxonox 35 35 { 36 Info::Info(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)36 Info::Info(BaseObject* creator) : BaseObject(creator), Synchronisable(creator) 37 37 { 38 38 RegisterObject(Info); -
code/branches/objecthierarchy/src/orxonox/objects/infos/Info.h
r2072 r2112 37 37 namespace orxonox 38 38 { 39 class _OrxonoxExport Info : public BaseObject, public network::Synchronisable39 class _OrxonoxExport Info : public BaseObject, public Synchronisable 40 40 { 41 41 public: -
code/branches/objecthierarchy/src/orxonox/objects/infos/Level.cc
r2086 r2112 81 81 void Level::registerVariables() 82 82 { 83 REGISTERSTRING(this->xmlfilename_, network::direction::toclient, new network::NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));84 REGISTERSTRING(this->name_, network::direction::toclient, new network::NetworkCallback<Level>(this, &Level::changedName));85 REGISTERSTRING(this->description_, network::direction::toclient);83 REGISTERSTRING(this->xmlfilename_, direction::toclient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile)); 84 REGISTERSTRING(this->name_, direction::toclient, new NetworkCallback<Level>(this, &Level::changedName)); 85 REGISTERSTRING(this->description_, direction::toclient); 86 86 } 87 87 -
code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc
r2072 r2112 42 42 RegisterObject(PlayerInfo); 43 43 44 this->clientID_ = network::CLIENTID_UNKNOWN;44 this->clientID_ = CLIENTID_UNKNOWN; 45 45 this->bHumanPlayer_ = false; 46 46 this->bLocalPlayer_ = false; … … 48 48 this->controller_ = 0; 49 49 this->controllableEntity_ = 0; 50 this->controllableEntityID_ = network::CLIENTID_UNKNOWN;50 this->controllableEntityID_ = CLIENTID_UNKNOWN; 51 51 52 52 this->registerVariables(); … … 69 69 void PlayerInfo::registerVariables() 70 70 { 71 REGISTERSTRING(this->name_, network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));72 REGISTERDATA (this->controllableEntityID_, network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));73 REGISTERDATA (this->bReadyToSpawn_, network::direction::toserver);71 REGISTERSTRING(this->name_, direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName)); 72 REGISTERDATA (this->controllableEntityID_, direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID)); 73 REGISTERDATA (this->bReadyToSpawn_, direction::toserver); 74 74 } 75 75 … … 126 126 else 127 127 { 128 this->controllableEntityID_ = network::OBJECTID_UNKNOWN;128 this->controllableEntityID_ = OBJECTID_UNKNOWN; 129 129 } 130 130 … … 138 138 { 139 139 this->controllableEntity_ = 0; 140 this->controllableEntityID_ = network::OBJECTID_UNKNOWN;140 this->controllableEntityID_ = OBJECTID_UNKNOWN; 141 141 142 142 if (this->controller_) … … 150 150 void PlayerInfo::networkcallback_changedcontrollableentityID() 151 151 { 152 if (this->controllableEntityID_ != network::OBJECTID_UNKNOWN)152 if (this->controllableEntityID_ != OBJECTID_UNKNOWN) 153 153 { 154 154 Synchronisable* temp = Synchronisable::getSynchronisable(this->controllableEntityID_);
Note: See TracChangeset
for help on using the changeset viewer.