Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 12, 2009, 9:24:58 PM (15 years ago)
Author:
landauf
Message:

changed type of gametype-HUD and default-HUD to PlayerInfo (instead of Gametype and ControllableEntity respectively). The owner of the Pawn-HUD remains Pawn.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/overlays/hud/GametypeStatus.cc

    r2662 r2973  
    5858        SUPER(GametypeStatus, tick, dt);
    5959
    60         if (this->owner_ && this->owner_->getGametypeInfo() && this->owner_->getPlayer())
     60        if (this->owner_ && this->owner_->getGametypeInfo() && this->owner_->getControllableEntity())
    6161        {
    6262            const GametypeInfo* gtinfo = this->owner_->getGametypeInfo();
    63             PlayerInfo* pinfo = this->owner_->getPlayer();
     63            ControllableEntity* ce = this->owner_->getControllableEntity();
    6464
    6565            if (!gtinfo->hasStarted() && !gtinfo->isStartCountdownRunning())
    6666            {
    67                 if (!pinfo->isReadyToSpawn())
     67                if (!this->owner_->isReadyToSpawn())
    6868                    this->setCaption("Press [Fire] to start the match");
    6969                else
     
    7474                if (gtinfo->isStartCountdownRunning())
    7575                    this->setCaption(convertToString((int)ceil(gtinfo->getStartCountdown())));
    76                 else if (this->owner_->isA(Class(Spectator)))
     76                else if (ce->isA(Class(Spectator)))
    7777                    this->setCaption("Press [Fire] to respawn");
    7878                else
     
    8989        SUPER(GametypeStatus, changedOwner);
    9090
    91         this->owner_ = dynamic_cast<ControllableEntity*>(this->getOwner());
     91        this->owner_ = dynamic_cast<PlayerInfo*>(this->getOwner());
    9292    }
    9393}
Note: See TracChangeset for help on using the changeset viewer.