Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 29, 2011, 7:15:43 PM (13 years ago)
Author:
landauf
Message:

small cleanup

Location:
code/branches/presentation/src/orxonox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/controllers/Controller.h

    r8580 r8668  
    5050                { return this->player_; }
    5151
    52             virtual inline void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) {};
     52            virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) {};
    5353
    5454/* Override needed for different visual effects (e.g. in "NewHumanController.cc") depending on
  • code/branches/presentation/src/orxonox/interfaces/InterfaceCompilation.cc

    r8667 r8668  
    4242#include "core/CoreIncludes.h"
    4343
     44#include "infos/PlayerInfo.h"
     45#include "worldentities/pawns/Pawn.h"
     46
    4447namespace orxonox
    4548{
     
    6063
    6164        this->isForPlayer_ = false;
     65    }
     66
     67    void PlayerTrigger::setTriggeringPawn(Pawn* pawn)
     68    {
     69        assert(pawn);
     70        this->pawn_ = WeakPtr<Pawn>(pawn);
     71        if (pawn)
     72            this->player_ = WeakPtr<PlayerInfo>(pawn->getPlayer());
    6273    }
    6374
  • code/branches/presentation/src/orxonox/interfaces/PlayerTrigger.h

    r8667 r8668  
    3939
    4040#include "core/OrxonoxClass.h"
    41 
    42 #include "infos/PlayerInfo.h"
    43 #include "worldentities/pawns/Pawn.h"
    4441
    4542namespace orxonox
     
    8683        @param player A pointer to the Pawn that triggered the PlayerTrigger.
    8784        */
    88         inline void setTriggeringPawn(Pawn* pawn)
    89            { assert(pawn); this->player_ = WeakPtr<PlayerInfo>(pawn->getPlayer()); this->pawn_ = WeakPtr<Pawn>(pawn); }
     85        void setTriggeringPawn(Pawn* pawn);
    9086
    9187        /**
  • code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc

    r8658 r8668  
    245245        Pawn::rotateYaw(value);
    246246
    247                 //This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
     247        //This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
    248248        if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveRightLeft(-lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
    249249    }
     
    255255        Pawn::rotatePitch(value);
    256256
    257                 //This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
     257        //This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
    258258        if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveUpDown(lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
    259259    }
Note: See TracChangeset for help on using the changeset viewer.