Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2009, 4:11:31 PM (15 years ago)
Author:
landauf
Message:

merged map branch back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/controllers/HumanController.cc

    r3073 r3089  
    3636#include "objects/gametypes/Gametype.h"
    3737#include "objects/infos/PlayerInfo.h"
     38#include "overlays/map/Map.h"
    3839
    3940namespace orxonox
     
    9394    void HumanController::rotateYaw(const Vector2& value)
    9495    {
     96        //Hack to enable mouselook in map
     97        if ( Map::getSingletonPtr() && Map::getSingletonPtr()->getVisibility() && HumanController::localController_s->controllableEntity_->isInMouseLook() )
     98        {
     99            Map::getSingletonPtr()->rotateYaw(value);
     100            return;
     101        }
    95102        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    96103            HumanController::localController_s->controllableEntity_->rotateYaw(value);
     
    99106    void HumanController::rotatePitch(const Vector2& value)
    100107    {
     108        //Hack to enable mouselook in map
     109        if ( Map::getSingletonPtr() && Map::getSingletonPtr()->getVisibility() && HumanController::localController_s->controllableEntity_->isInMouseLook() )
     110        {
     111            Map::getSingletonPtr()->rotatePitch(value);
     112            return;
     113        }
    101114        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
    102115            HumanController::localController_s->controllableEntity_->rotatePitch(value);
Note: See TracChangeset for help on using the changeset viewer.