Changeset 2973 for code/trunk/src/orxonox/overlays/hud
- Timestamp:
- May 12, 2009, 9:24:58 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/overlays/hud
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/overlays/hud/GametypeStatus.cc
r2662 r2973 58 58 SUPER(GametypeStatus, tick, dt); 59 59 60 if (this->owner_ && this->owner_->getGametypeInfo() && this->owner_->get Player())60 if (this->owner_ && this->owner_->getGametypeInfo() && this->owner_->getControllableEntity()) 61 61 { 62 62 const GametypeInfo* gtinfo = this->owner_->getGametypeInfo(); 63 PlayerInfo* pinfo = this->owner_->getPlayer();63 ControllableEntity* ce = this->owner_->getControllableEntity(); 64 64 65 65 if (!gtinfo->hasStarted() && !gtinfo->isStartCountdownRunning()) 66 66 { 67 if (! pinfo->isReadyToSpawn())67 if (!this->owner_->isReadyToSpawn()) 68 68 this->setCaption("Press [Fire] to start the match"); 69 69 else … … 74 74 if (gtinfo->isStartCountdownRunning()) 75 75 this->setCaption(convertToString((int)ceil(gtinfo->getStartCountdown()))); 76 else if ( this->owner_->isA(Class(Spectator)))76 else if (ce->isA(Class(Spectator))) 77 77 this->setCaption("Press [Fire] to respawn"); 78 78 else … … 89 89 SUPER(GametypeStatus, changedOwner); 90 90 91 this->owner_ = dynamic_cast< ControllableEntity*>(this->getOwner());91 this->owner_ = dynamic_cast<PlayerInfo*>(this->getOwner()); 92 92 } 93 93 } -
code/trunk/src/orxonox/overlays/hud/GametypeStatus.h
r2662 r2973 47 47 48 48 private: 49 ControllableEntity* owner_;49 PlayerInfo* owner_; 50 50 }; 51 51 } -
code/trunk/src/orxonox/overlays/hud/PongScore.cc
r2890 r2973 135 135 SUPER(PongScore, changedOwner); 136 136 137 this->owner_ = dynamic_cast<Pong*>(this->getOwner()); 137 if (this->getOwner() && this->getOwner()->getGametype()) 138 this->owner_ = dynamic_cast<Pong*>(this->getOwner()->getGametype()); 139 else 140 this->owner_ = 0; 138 141 } 139 142 }
Note: See TracChangeset
for help on using the changeset viewer.