Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 16, 2011, 4:25:28 PM (12 years ago)
Author:
jo
Message:

Rough adding of both concepts. Further work on the states is needed. (single player bots are inactive at the moment)

File:
1 edited

Legend:

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

    r8989 r8990  
    3030#include "core/CoreIncludes.h"
    3131#include "worldentities/pawns/Pawn.h"
     32#include "worldentities/pawns/SpaceShip.h"
     33
     34#include "weaponsystem/WeaponMode.h"
     35#include "weaponsystem/WeaponPack.h"
     36#include "weaponsystem/Weapon.h"
     37#include "weaponsystem/WeaponSlot.h"
     38#include "weaponsystem/WeaponSlot.h"
    3239
    3340
     
    3744    ArtificialController::ArtificialController(BaseObject* creator) : FormationController(creator)
    3845    {
    39          
     46        this->bSetupWorked = false;
     47        this->botlevel_ = 0.5f;
     48        this->timeout_ = 0;
     49        this->currentWaypoint_ = 0;
     50        this->setAccuracy(5);
     51        this->defaultWaypoint_ = NULL;
    4052    }
    4153
    4254    ArtificialController::~ArtificialController()
    4355    {
    44        
     56        if (this->isInitialized())
     57        {//Vector-implementation: mode_.erase(mode_.begin(),mode_.end());
     58            this->waypoints_.clear();
     59            this->weaponModes_.clear();
     60        }
    4561    }
    4662
     
    181197    void ArtificialController::setPreviousMode()
    182198    {
    183         this->mode_ = DEFAULT; //Vector-implementation: mode_.pop_back();
     199        this->mode_ = NORMAL; //Vector-implementation: mode_.pop_back();
    184200    }
    185201
     
    249265
    250266    /**
    251         @brief Adds point of interest depending on context. Further Possibilites: "ForceField", "PortalEndPoint", "MovableEntity", "Dock"
     267        @brief Adds point of interest depending on context.  TODO: Further Possibilites: "ForceField", "PortalEndPoint", "MovableEntity", "Dock"
    252268    */
    253269    void ArtificialController::manageWaypoints()
Note: See TracChangeset for help on using the changeset viewer.