Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 20, 2009, 8:15:25 PM (15 years ago)
Author:
scheusso
Message:

merged steering branch to presentation2 branch

Location:
code/branches/presentation2
Files:
6 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2

  • code/branches/presentation2/src/orxonox/controllers/CMakeLists.txt

    r5781 r6108  
    22  Controller.cc
    33  HumanController.cc
     4  NewHumanController.cc
    45  ArtificialController.cc
    56  AIController.cc
  • code/branches/presentation2/src/orxonox/controllers/Controller.cc

    r5781 r6108  
    2929#include "Controller.h"
    3030#include "core/CoreIncludes.h"
     31#include "worldentities/ControllableEntity.h"
    3132
    3233namespace orxonox
  • code/branches/presentation2/src/orxonox/controllers/Controller.h

    r6107 r6108  
    5454            virtual void changedControllableEntity() {}
    5555
     56            virtual bool canFindTarget()
     57                { return false; }
     58            virtual Vector3 getTarget()
     59                { return Vector3::ZERO; }
     60
    5661        protected:
    5762            // don't use this directly, use getPlayer()->startControl(entity) (unless you know exactly what you do)
     
    6570            }
    6671
     72        protected:
    6773            PlayerInfo* player_;
    6874            ControllableEntity* controllableEntity_;
  • code/branches/presentation2/src/orxonox/controllers/HumanController.cc

    r5929 r6108  
    113113    }
    114114
    115     void HumanController::rotateYaw(const Vector2& value)
     115    void HumanController::yaw(const Vector2& value)
    116116    {
    117117        //Hack to enable mouselook in map
     
    125125    }
    126126
    127     void HumanController::rotatePitch(const Vector2& value)
     127    void HumanController::pitch(const Vector2& value)
    128128    {
    129129        //Hack to enable mouselook in map
     
    143143    }
    144144
    145     void HumanController::fire(unsigned int firemode)
     145    void HumanController::doFire(unsigned int firemode)
    146146    {
    147147        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
  • code/branches/presentation2/src/orxonox/controllers/HumanController.h

    r5929 r6108  
    4949            static void moveUpDown(const Vector2& value);
    5050
    51             static void rotateYaw(const Vector2& value);
    52             static void rotatePitch(const Vector2& value);
     51            static void rotateYaw(const Vector2& value){ HumanController::localController_s->yaw(value); }
     52            static void rotatePitch(const Vector2& value){ HumanController::localController_s->pitch(value); }
    5353            static void rotateRoll(const Vector2& value);
     54           
     55            virtual void yaw(const Vector2& value);
     56            virtual void pitch(const Vector2& value);
    5457
    55             static void fire(unsigned int firemode);
     58            static void fire(unsigned int firemode) { HumanController::localController_s->doFire(firemode); }
     59            virtual void doFire(unsigned int firemode);
    5660            static void reload();
    5761
     
    7680            friend class Map;
    7781
    78         private:
     82        protected:
    7983            static HumanController* localController_s;
    8084    };
Note: See TracChangeset for help on using the changeset viewer.