Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2018, 7:51:11 PM (5 years ago)
Author:
stadlero
Message:

some bugfixes

File:
1 edited

Legend:

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

    r12150 r12160  
    4747                        this->province_selection_changed = true;
    4848                    }else{
     49                        if(this->origin_province != nullptr) this->origin_province->dehighlight();
    4950                        this->origin_province = prov;
     51                        this->origin_province->highlight();
    5052                        this->province_selection_changed = true;
    5153                    }
     
    8284                                this->reinforcements -= 1;
    8385                                orxout()<<"Province "<<this->target_province->getID()<<" owned by Player "<<this->target_province->getOwner_ID()<<" troops: "<<this->target_province->getTroops()<<endl;
     86                                if(reinforcements == 0) master->playerFinishedStageCallback(this);
    8487                            }
    8588                        }   
     
    351354        return this->is_active;
    352355    }
     356
     357    //Resets the two province pointers and dehighlights them.
     358    void WagnisPlayer::resetProvinceSelection(){
     359
     360        if(this->origin_province != nullptr)this->origin_province->dehighlight();
     361        if(this->target_province != nullptr)this->target_province->dehighlight();
     362        this->origin_province = nullptr;
     363        this->target_province = nullptr;
     364    }
    353365}
Note: See TracChangeset for help on using the changeset viewer.