Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2010, 2:10:35 PM (14 years ago)
Author:
scheusso
Message:

RadarViewable need a worldentity* when constructing
i really thought i already did this

Location:
code/branches/presentation3/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/modules/objects/triggers/CheckPoint.cc

    r6942 r7045  
    4040    CheckPoint::CheckPoint(BaseObject* creator)
    4141        : DistanceTrigger(creator)
    42         , RadarViewable(creator)
     42        , RadarViewable(creator, static_cast<WorldEntity*>(this))
    4343    {
    4444        RegisterObject(CheckPoint);
  • code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc

    r6961 r7045  
    4141        @brief Constructor.
    4242    */
    43     RadarViewable::RadarViewable(BaseObject* creator)
     43    RadarViewable::RadarViewable(BaseObject* creator, const WorldEntity* wePtr)
    4444        : isHumanShip_(false)
    4545        , bVisibility_(true)
    4646        , bInitialized_(false)
    4747        , creator_(creator)
     48        , wePtr_(wePtr)
    4849        , radarObjectCamouflage_(0.0f)
    4950        , radarObjectShape_(Dot)
  • code/branches/presentation3/src/orxonox/interfaces/RadarViewable.h

    r6942 r7045  
    5858
    5959    public:
    60         RadarViewable(BaseObject* creator);
     60        RadarViewable(BaseObject* creator, const WorldEntity* wePtr);
    6161        virtual ~RadarViewable();
    6262
     
    9898            { return this->bVisibility_; }
    9999
    100         virtual const WorldEntity* getWorldEntity() const = 0;
     100        virtual const WorldEntity* getWorldEntity() const{ return this->wePtr_; }
    101101
    102102        const Vector3& getRVWorldPosition() const;
     
    133133
    134134        //Radar
     135        const WorldEntity* wePtr_;
    135136        SmartPtr<Radar> radar_;
    136137        float radarObjectCamouflage_;
  • code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc

    r6998 r7045  
    5555    Pawn::Pawn(BaseObject* creator)
    5656        : ControllableEntity(creator)
    57         , RadarViewable(creator)
     57        , RadarViewable(creator, static_cast<WorldEntity*>(this))
    5858    {
    5959        RegisterObject(Pawn);
Note: See TracChangeset for help on using the changeset viewer.