Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8978 for code/branches


Ignore:
Timestamp:
Dec 14, 2011, 2:15:45 PM (13 years ago)
Author:
willis
Message:

renamed Masterable to FormationController, some minor changes

Location:
code/branches/formation/src/orxonox/controllers
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/formation/src/orxonox/controllers/AIController.cc

    r8965 r8978  
    118118        if (this->state_ == SLAVE && this->mode_==ATTACK)
    119119        {
    120             if (!this->target_)
    121             {
    122                this->searchNewTarget();
    123             }
     120            // search enemy
     121            random = rnd(maxrand);
     122            if (random < 75 && (!this->target_))
     123                this->searchNewTarget();
    124124
    125125            // next enemy
  • code/branches/formation/src/orxonox/controllers/ArtificialController.cc

    r8953 r8978  
    3535{
    3636
    37     ArtificialController::ArtificialController(BaseObject* creator) : Masterable(creator)
     37    ArtificialController::ArtificialController(BaseObject* creator) : FormationController(creator)
    3838    {
    3939         
  • code/branches/formation/src/orxonox/controllers/ArtificialController.h

    r8953 r8978  
    3131
    3232#include "OrxonoxPrereqs.h"
    33 #include "controllers/Masterable.h"
     33#include "controllers/FormationController.h"
    3434
    3535namespace orxonox
    3636{
    37     class _OrxonoxExport ArtificialController : public Masterable
     37    class _OrxonoxExport ArtificialController : public FormationController
    3838    {
    3939        public:
  • code/branches/formation/src/orxonox/controllers/CMakeLists.txt

    r8939 r8978  
    99  WaypointPatrolController.cc
    1010  DroneController.cc
    11   Masterable.cc
     11  FormationController.cc
    1212)
  • code/branches/formation/src/orxonox/controllers/HumanController.cc

    r8965 r8978  
    7171    /*static*/ const float HumanController::BOOSTING_TIME = 0.1f;
    7272
    73     HumanController::HumanController(BaseObject* creator) : Masterable(creator)
     73    HumanController::HumanController(BaseObject* creator) : FormationController(creator)
    7474    {
    7575        RegisterObject(HumanController);
     
    176176        {
    177177            HumanController::localController_s->controllableEntity_->fire(firemode);
    178             //if human fires, set slaves free. See Masterable::forceFreeSlaves()
     178            //if human fires, set slaves free. See FormationController::forceFreeSlaves()
    179179            if (HumanController::localController_s->state_==MASTER && HumanController::localController_s->mode_==NORMAL)
    180180            {
  • code/branches/formation/src/orxonox/controllers/HumanController.h

    r8965 r8978  
    3434#include "tools/Timer.h"
    3535#include "tools/interfaces/Tickable.h"
    36 #include "Masterable.h"
     36#include "FormationController.h"
    3737
    3838// tolua_begin
     
    4141    class _OrxonoxExport HumanController
    4242// tolua_end
    43         : public Masterable, public Tickable
     43        : public FormationController, public Tickable
    4444    { // tolua_export
    4545        public:
     
    113113            Timer boostingTimeout_; // A timer to check whether the player is no longer boosting.
    114114            static const float BOOSTING_TIME; // The time after it is checked, whether the player is no longer boosting.
    115             Masterable* tempMaster;
     115            FormationController* tempMaster;
    116116
    117117    }; // tolua_export
Note: See TracChangeset for help on using the changeset viewer.