Changeset 7823 for code/branches/network6/src/orxonox
- Timestamp:
- Dec 28, 2010, 4:46:42 PM (14 years ago)
- Location:
- code/branches/network6/src/orxonox
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network6/src/orxonox/ChatHistory.cc
r7284 r7823 82 82 #ifndef CHATTEST 83 83 /* get sender ID and prepend it to the message */ 84 if (senderID != CLIENTID_UNKNOWN)84 if (senderID != NETWORK_PEER_ID_UNKNOWN) 85 85 { 86 86 /* if we can't find anything, use "unknown" as default */ -
code/branches/network6/src/orxonox/ChatInputHandler.cc
r7284 r7823 207 207 208 208 /* setup player name info */ 209 if (senderID != CLIENTID_UNKNOWN)209 if (senderID != NETWORK_PEER_ID_UNKNOWN) 210 210 { 211 211 PlayerInfo* player = PlayerManager::getInstance().getClient(senderID); -
code/branches/network6/src/orxonox/PlayerManager.cc
r7474 r7823 45 45 RegisterRootObject(PlayerManager); 46 46 47 this->getConnectedClients();47 // this->getConnectedClients(); 48 48 } 49 49 -
code/branches/network6/src/orxonox/gamestates/GSRoot.cc
r7284 r7823 160 160 { 161 161 if (!GameMode::isStandalone()) 162 callStaticNetworkFunction(&TimeFactorListener::setTimeFactor, CLIENTID_UNKNOWN, factor_new);162 callStaticNetworkFunction(&TimeFactorListener::setTimeFactor, NETWORK_PEER_ID_BROADCAST, factor_new); 163 163 } 164 164 } -
code/branches/network6/src/orxonox/gametypes/Dynamicmatch.cc
r7284 r7823 452 452 if (!it->first)//in order to catch nullpointer 453 453 continue; 454 if (it->first->getClientID() == CLIENTID_UNKNOWN)454 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 455 455 continue; 456 456 this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f)); … … 467 467 if (!it->first)//in order to catch nullpointer 468 468 continue; 469 if (it->first->getClientID() == CLIENTID_UNKNOWN)469 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 470 470 continue; 471 471 else if (it->second==chaser) … … 501 501 if (!it->first)//in order to catch nullpointer 502 502 continue; 503 if (it->first->getClientID() == CLIENTID_UNKNOWN)503 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 504 504 continue; 505 505 this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f)); … … 516 516 if (!it->first) 517 517 continue; 518 if (it->first->getClientID() == CLIENTID_UNKNOWN)518 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 519 519 continue; 520 520 else if (it->second==chaser) … … 551 551 if (!it->first)//in order to catch nullpointer 552 552 continue; 553 if (it->first->getClientID() == CLIENTID_UNKNOWN)553 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 554 554 continue; 555 555 this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f)); … … 566 566 if (!it->first) 567 567 continue; 568 if (it->first->getClientID() == CLIENTID_UNKNOWN)568 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 569 569 continue; 570 570 else if (it->second==chaser) … … 632 632 for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it) 633 633 { 634 if (it->first->getClientID() == CLIENTID_UNKNOWN)634 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 635 635 continue; 636 636 this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f)); -
code/branches/network6/src/orxonox/gametypes/Gametype.cc
r7801 r7823 262 262 it->second.frags_++; 263 263 264 if (killer->getPlayer()->getClientID() != CLIENTID_UNKNOWN)264 if (killer->getPlayer()->getClientID() != NETWORK_PEER_ID_UNKNOWN) 265 265 this->gtinfo_->sendKillMessage("You killed " + victim->getPlayer()->getName(), killer->getPlayer()->getClientID()); 266 if (victim->getPlayer()->getClientID() != CLIENTID_UNKNOWN)266 if (victim->getPlayer()->getClientID() != NETWORK_PEER_ID_UNKNOWN) 267 267 this->gtinfo_->sendDeathMessage("You were killed by " + killer->getPlayer()->getName(), victim->getPlayer()->getClientID()); 268 268 } -
code/branches/network6/src/orxonox/gametypes/LastManStanding.cc
r7655 r7823 86 86 if (it != this->players_.end()) 87 87 { 88 if (it->first->getClientID()== CLIENTID_UNKNOWN)88 if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN) 89 89 return true; 90 90 const std::string& message = ""; // resets Camper-Warning-message … … 131 131 for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it) 132 132 { 133 if (it->first->getClientID() == CLIENTID_UNKNOWN)133 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 134 134 continue; 135 135 … … 194 194 if (it != this->players_.end()) 195 195 { 196 if (it->first->getClientID()== CLIENTID_UNKNOWN)196 if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN) 197 197 return; 198 198 const std::string& message = ""; // resets Camper-Warning-message … … 249 249 this->inGame_[it->first]=true; 250 250 251 if (it->first->getClientID()== CLIENTID_UNKNOWN)251 if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN) 252 252 continue; 253 253 int output=1+playerDelayTime_[it->first]; … … 261 261 { 262 262 this->punishPlayer(it->first); 263 if (it->first->getClientID()== CLIENTID_UNKNOWN)263 if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN) 264 264 return; 265 265 const std::string& message = ""; // resets Camper-Warning-message … … 269 269 else if (it->second<timeRemaining/5)//Warning message 270 270 { 271 if (it->first->getClientID()== CLIENTID_UNKNOWN)271 if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN) 272 272 continue; 273 273 const std::string& message = "Camper Warning! Don't forget to shoot."; -
code/branches/network6/src/orxonox/gametypes/TeamBaseMatch.cc
r7284 r7823 190 190 for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it) 191 191 { 192 if (it->first->getClientID() == CLIENTID_UNKNOWN)192 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 193 193 continue; 194 194 -
code/branches/network6/src/orxonox/gametypes/UnderAttack.cc
r6417 r7823 76 76 for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it) 77 77 { 78 if (it->first->getClientID() == CLIENTID_UNKNOWN)78 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 79 79 continue; 80 80 … … 158 158 for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it) 159 159 { 160 if (it->first->getClientID() == CLIENTID_UNKNOWN)160 if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN) 161 161 continue; 162 162 -
code/branches/network6/src/orxonox/infos/GametypeInfo.cc
r7163 r7823 74 74 if (GameMode::isMaster()) 75 75 { 76 callMemberNetworkFunction(GametypeInfo, dispatchAnnounceMessage, this->getObjectID(), CLIENTID_UNKNOWN, message);76 callMemberNetworkFunction(GametypeInfo, dispatchAnnounceMessage, this->getObjectID(), NETWORK_PEER_ID_BROADCAST, message); 77 77 this->dispatchAnnounceMessage(message); 78 78 } -
code/branches/network6/src/orxonox/infos/HumanPlayer.cc
r6417 r7823 32 32 #include "core/ConfigValueIncludes.h" 33 33 #include "core/GameMode.h" 34 #include "network/ClientInformation.h"34 // #include "network/ClientInformation.h" 35 35 #include "network/Host.h" 36 36 #include "controllers/HumanController.h" … … 144 144 float HumanPlayer::getPing() const 145 145 { 146 return static_cast<float>(ClientInformation::findClient(this->getClientID())->getRTT()); 146 // return static_cast<float>(ClientInformation::findClient(this->getClientID())->getRTT()); 147 return 0.; //TODO: reimplement this 147 148 } 148 149 149 150 float HumanPlayer::getPacketLossRatio() const 150 151 { 151 return static_cast<float>(ClientInformation::findClient(this->getClientID())->getPacketLoss()); 152 // return static_cast<float>(ClientInformation::findClient(this->getClientID())->getPacketLoss()); 153 return 0.; //TODO: reimplement this 152 154 } 153 155 -
code/branches/network6/src/orxonox/infos/PlayerInfo.cc
r7163 r7823 32 32 33 33 #include "core/CoreIncludes.h" 34 #include "network/ClientInformation.h"34 // #include "network/ClientInformation.h" 35 35 #include "gametypes/Gametype.h" 36 36 #include "worldentities/ControllableEntity.h" … … 43 43 RegisterObject(PlayerInfo); 44 44 45 this->clientID_ = CLIENTID_UNKNOWN;45 this->clientID_ = NETWORK_PEER_ID_UNKNOWN; 46 46 this->bHumanPlayer_ = false; 47 47 this->bLocalPlayer_ = false;
Note: See TracChangeset
for help on using the changeset viewer.