Changeset 2160 for code/branches/objecthierarchy/src/orxonox/objects/infos
- Timestamp:
- Nov 8, 2008, 10:05:06 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox/objects/infos
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/objects/infos/HumanPlayer.cc
r2112 r2160 46 46 RegisterObject(HumanPlayer); 47 47 48 this->server_ ready_ = Core::isMaster();49 this->client_ ready_ = false;48 this->server_initialized_ = Core::isMaster(); 49 this->client_initialized_ = false; 50 50 51 51 this->bHumanPlayer_ = true; … … 70 70 71 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));72 REGISTERDATA(this->server_initialized_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized)); 73 REGISTERDATA(this->client_initialized_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized)); 74 74 } 75 75 … … 96 96 this->bLocalPlayer_ = true; 97 97 this->synchronize_nick_ = this->nick_; 98 this->client_ ready_ = true;98 this->client_initialized_ = true; 99 99 100 100 if (!Core::isMaster()) … … 107 107 } 108 108 109 void HumanPlayer::networkcallback_server_ ready()109 void HumanPlayer::networkcallback_server_initialized() 110 110 { 111 this->client_ ready_ = true;111 this->client_initialized_ = true; 112 112 } 113 113 114 void HumanPlayer::networkcallback_client_ ready()114 void HumanPlayer::networkcallback_client_initialized() 115 115 { 116 116 if (this->getGametype()) … … 118 118 } 119 119 120 bool HumanPlayer::is Ready() const120 bool HumanPlayer::isInitialized() const 121 121 { 122 return (this->server_ ready_ && this->client_ready_);122 return (this->server_initialized_ && this->client_initialized_); 123 123 } 124 124 -
code/branches/objecthierarchy/src/orxonox/objects/infos/HumanPlayer.h
r2072 r2160 47 47 void setConfigValues(); 48 48 49 bool is Ready() const;49 bool isInitialized() const; 50 50 float getPing() const; 51 51 float getPacketLossRatio() const; … … 57 57 void networkcallback_changednick(); 58 58 void networkcallback_clientIDchanged(); 59 void networkcallback_server_ ready();60 void networkcallback_client_ ready();59 void networkcallback_server_initialized(); 60 void networkcallback_client_initialized(); 61 61 62 62 std::string nick_; 63 63 std::string synchronize_nick_; 64 bool server_ ready_;65 bool client_ ready_;64 bool server_initialized_; 65 bool client_initialized_; 66 66 }; 67 67 } -
code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc
r2112 r2160 55 55 PlayerInfo::~PlayerInfo() 56 56 { 57 if (this-> isInitialized())57 if (this->BaseObject::isInitialized()) 58 58 { 59 59 this->stopControl(this->controllableEntity_); … … 76 76 void PlayerInfo::changedName() 77 77 { 78 if (this->is Ready() && this->getGametype())78 if (this->isInitialized() && this->getGametype()) 79 79 this->getGametype()->playerChangedName(this); 80 80 } … … 82 82 void PlayerInfo::changedGametype() 83 83 { 84 if (this->is Ready())84 if (this->isInitialized()) 85 85 { 86 86 if (this->getOldGametype()) -
code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h
r2072 r2160 55 55 inline unsigned int getClientID() const 56 56 { return this->clientID_; } 57 inline bool isReadyToSpawn() const58 { return this->bReadyToSpawn_; }59 57 60 virtual bool is Ready() const = 0;58 virtual bool isInitialized() const = 0; 61 59 virtual float getPing() const = 0; 62 60 virtual float getPacketLossRatio() const = 0; … … 64 62 inline void setReadyToSpawn(bool bReady) 65 63 { this->bReadyToSpawn_ = bReady; } 64 inline bool isReadyToSpawn() const 65 { return this->bReadyToSpawn_; } 66 66 67 67 void startControl(ControllableEntity* entity);
Note: See TracChangeset
for help on using the changeset viewer.