Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 4, 2011, 10:27:17 PM (13 years ago)
Author:
jo
Message:

Radar fix: pawns were not displayed when their visibility/activity changed from 'invisible' to 'visible'.

Location:
code/branches/ai2/src/orxonox/worldentities/pawns
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ai2/src/orxonox/worldentities/pawns/Pawn.cc

    r8758 r8875  
    452452        this->isHumanShip_ = true;
    453453    }
     454
     455    void Pawn::changedActivity(void)
     456    {
     457        SUPER(Pawn, changedActivity);
     458
     459        this->setRadarVisibility(this->isActive());
     460    }
     461
     462    void Pawn::changedVisibility(void)
     463    {
     464        SUPER(Pawn, changedVisibility);
     465        //this->setVisible(this->isVisible());
     466        this->setRadarVisibility(this->isVisible());
     467    }
     468
    454469}
  • code/branches/ai2/src/orxonox/worldentities/pawns/Pawn.h

    r8852 r8875  
    170170            virtual const Vector3& getCarrierPosition(void) const
    171171                { return this->getWorldPosition(); };
     172            virtual void changedActivity(void); //!< To enable radarviewability when the activity is changed
     173            virtual void changedVisibility(void); //!< To enable proper radarviewability when the visibility is changed
    172174
    173175        protected:
Note: See TracChangeset for help on using the changeset viewer.