Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2012, 9:06:02 AM (13 years ago)
Author:
landauf
Message:

I think this implementation of the hit() function rather belongs to FormationController than to HumanController

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/controllers/FormationController.cc

    r9255 r9256  
    252252    }
    253253
    254   void FormationController::removeFromFormation()
     254    //used, when slaves are in DEFEND mode.
     255    void FormationController::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage)
     256    {
     257        if (!this->formationFlight_ || this->state_!=MASTER || this->formationMode_!=DEFEND) return;
     258            this->masterAttacked(originator);
     259    }
     260
     261    void FormationController::removeFromFormation()
    255262    {
    256263        if (this->state_ == SLAVE || this->myMaster_) // slaves can also be temporary free, so check if myMaster_ is set
Note: See TracChangeset for help on using the changeset viewer.