- Timestamp:
- Nov 2, 2008, 12:54:17 PM (16 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.