Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6159 for code


Ignore:
Timestamp:
Nov 26, 2009, 2:09:40 PM (15 years ago)
Author:
rgrieder
Message:

Fixed bug in HumanController introduced with the virtual functions.

Location:
code/branches/presentation2/src/orxonox/controllers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/controllers/HumanController.cc

    r6149 r6159  
    9595    }
    9696
     97    void HumanController::moveFrontBack(const Vector2& value)
     98    {
     99        if (HumanController::localController_s)
     100            HumanController::localController_s->frontback(value);
     101    }
     102
    97103    void HumanController::frontback(const Vector2& value)
    98104    {
     
    137143    }
    138144
     145    void HumanController::rotateYaw(const Vector2& value)
     146    {
     147        if (HumanController::localController_s)
     148            HumanController::localController_s->yaw(value);
     149    }
     150
     151    void HumanController::rotatePitch(const Vector2& value)
     152    {
     153        if (HumanController::localController_s)
     154            HumanController::localController_s->pitch(value);
     155    }
     156
    139157    void HumanController::rotateRoll(const Vector2& value)
    140158    {
    141159        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    142160            HumanController::localController_s->controllableEntity_->rotateRoll(value);
     161    }
     162
     163    void HumanController::fire(unsigned int firemode)
     164    {
     165        if (HumanController::localController_s)
     166            HumanController::localController_s->doFire(firemode);
    143167    }
    144168
  • code/branches/presentation2/src/orxonox/controllers/HumanController.h

    r6149 r6159  
    4545            virtual void tick(float dt);
    4646
    47             static void moveFrontBack(const Vector2& value){ HumanController::localController_s->frontback(value); }
     47            static void moveFrontBack(const Vector2& value);
    4848            static void moveRightLeft(const Vector2& value);
    4949            static void moveUpDown(const Vector2& value);
    5050
    51             static void rotateYaw(const Vector2& value){ HumanController::localController_s->yaw(value); }
    52             static void rotatePitch(const Vector2& value){ HumanController::localController_s->pitch(value); }
     51            static void rotateYaw(const Vector2& value);
     52            static void rotatePitch(const Vector2& value);
    5353            static void rotateRoll(const Vector2& value);
    5454
     
    5757            virtual void pitch(const Vector2& value);
    5858
    59             static void fire(unsigned int firemode) { HumanController::localController_s->doFire(firemode); }
     59            static void fire(unsigned int firemode);
    6060            virtual void doFire(unsigned int firemode);
    6161            static void reload();
Note: See TracChangeset for help on using the changeset viewer.