Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 29, 2018, 7:22:46 PM (5 years ago)
Author:
stadlero
Message:

Wagnis runs without crashing on startup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/wagnis_HS18/src/modules/wagnis/WagnisPlayer.cc

    r12130 r12132  
    2121        this->target_province = nullptr;
    2222        this->province_selection_changed = false;
     23        this->gameStage = NOT_READY;
    2324    }
    2425    //Destructor
     
    3031        SUPER(WagnisPlayer, tick, dt);
    3132
    32         ///////////TEST//////////////
    33         /**
    34         if(this->is_active){
    35             (master ->* ((orxonox::WagnisPlayer*)this)->orxonox::WagnisPlayer::finishedStageCallback) (this);
    36         }
    37 
    38         **/
    39         ///////////TEST//////////////
    40 
    41 
    42 
    4333        if(this->is_active)
    4434        {
     35           
    4536            for(WagnisProvince* prov:this->gameBoard->provs){
     37                //orxout()<<"province health: "<<prov->getHealth()<<endl;
    4638                if(prov->getHealth() < prov->getMaxHealth()){
     39                    //Check if next-player-button was hit
     40                    if(prov->getID() == 1000){
     41                        master->playerFinishedStageCallback(this);
     42                        break;
     43                    }
     44                    //Check left/right click
    4745                    if(prov->getHealth() <= prov->getMaxHealth()-1000.0f){
    4846                        this->target_province = prov;
     
    5250                        this->province_selection_changed = true;
    5351                    }
     52                    prov->setHealth(prov->getMaxHealth());
    5453                }
    5554            }
Note: See TracChangeset for help on using the changeset viewer.