Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/infos/PlayerInfo.cc

    r11052 r11071  
    5151        this->bReadyToSpawn_ = false;
    5252        this->bSetUnreadyAfterSpawn_ = true;
    53         this->controller_ = 0;
    54         this->controllableEntity_ = 0;
     53        this->controller_ = nullptr;
     54        this->controllableEntity_ = nullptr;
    5555        this->controllableEntityID_ = OBJECTID_UNKNOWN;
    5656
    57         this->gtinfo_ = 0;
     57        this->gtinfo_ = nullptr;
    5858        this->gtinfoID_ = OBJECTID_UNKNOWN;
    5959        this->updateGametypeInfo(this->getGametype());
     
    7272            {
    7373                this->controller_->destroy();
    74                 this->controller_ = 0;
     74                this->controller_ = nullptr;
    7575            }
    7676
     
    126126    void PlayerInfo::updateGametypeInfo(Gametype* gametype)
    127127    {
    128         this->gtinfo_ = 0;
     128        this->gtinfo_ = nullptr;
    129129        this->gtinfoID_ = OBJECTID_UNKNOWN;
    130130
     
    141141        {
    142142            this->controller_->destroy();
    143             this->controller_ = 0;
     143            this->controller_ = nullptr;
    144144        }
    145145        this->controller_ = this->defaultController_.fabricate(this->getContext());
     
    181181
    182182        RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity);
    183         if (radarviewable != NULL)
     183        if (radarviewable != nullptr)
    184184            radarviewable->setRadarName(this->getName());
    185185    }
     
    218218            return;
    219219
    220         this->controllableEntity_->setController(0);
    221         this->controllableEntity_ = 0;
     220        this->controllableEntity_->setController(nullptr);
     221        this->controllableEntity_ = nullptr;
    222222        this->controllableEntityID_ = OBJECTID_UNKNOWN;
    223223
    224224        if (this->controller_)
    225             this->controller_->setControllableEntity(0);
     225            this->controller_->setControllableEntity(nullptr);
    226226
    227227        if ( GameMode::isMaster() )
     
    239239
    240240        Controller* tmp =this->controllableEntity_->getController();
    241         if (tmp == NULL)
    242         {
    243             orxout(verbose) <<  "PlayerInfo: pauseControl, Controller is NULL " << endl;
     241        if (tmp == nullptr)
     242        {
     243            orxout(verbose) <<  "PlayerInfo: pauseControl, Controller is nullptr " << endl;
    244244            return;
    245245        }
    246246        tmp->setActive(false);
    247         //this->controllableEntity_->getController()->setControllableEntity(NULL);
    248         this->controllableEntity_->setController(0);
     247        //this->controllableEntity_->getController()->setControllableEntity(nullptr);
     248        this->controllableEntity_->setController(nullptr);
    249249    }
    250250
     
    253253        ControllableEntity* entity = this->controllableEntity_;
    254254
    255         assert(this->controllableEntity_ != NULL);
     255        assert(this->controllableEntity_ != nullptr);
    256256        if( !entity || this->previousControllableEntity_.size() == 0 )
    257257            return;
     
    259259        entity->destroyHud(); // HACK-ish
    260260
    261         this->controllableEntity_->setController(0);
     261        this->controllableEntity_->setController(nullptr);
    262262        if(this->isHumanPlayer()) // TODO: Multiplayer?
    263263            this->controllableEntity_->destroyHud(); // HACK-ish
     
    266266        do {
    267267            this->controllableEntity_ = this->previousControllableEntity_.back();
    268         } while(this->controllableEntity_ == NULL && this->previousControllableEntity_.size() > 0);
     268        } while(this->controllableEntity_ == nullptr && this->previousControllableEntity_.size() > 0);
    269269        this->controllableEntityID_ = this->controllableEntity_->getObjectID();
    270270        this->previousControllableEntity_.pop_back();
    271271
    272         if ( this->controllableEntity_ != NULL && this->controller_ != NULL)
     272        if ( this->controllableEntity_ != nullptr && this->controller_ != nullptr)
    273273            this->controller_->setControllableEntity(this->controllableEntity_);
    274274
    275275         // HACK-ish
    276         if(this->controllableEntity_ != NULL && this->isHumanPlayer())
     276        if(this->controllableEntity_ != nullptr && this->isHumanPlayer())
    277277            this->controllableEntity_->createHud();
    278278
Note: See TracChangeset for help on using the changeset viewer.