Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9254


Ignore:
Timestamp:
May 28, 2012, 12:19:54 AM (12 years ago)
Author:
landauf
Message:

update radar-visibility if the visibility of the pawn itself changes. but don't tie it to the visibility directly (and neither to the activity).

Location:
code/trunk/src/orxonox/worldentities/pawns
Files:
2 edited

Legend:

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

    r9016 r9254  
    129129        XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
    130130        XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
    131    
     131
    132132        XMLPortParam ( RadarViewable, "RVName", setRVName, getRVName, xmlelement, mode );
    133133    }
     
    453453    }
    454454
    455     void Pawn::changedActivity(void)
    456     {
    457         SUPER(Pawn, changedActivity);
    458 
    459         this->setRadarVisibility(this->isVisible());
    460     }
    461 
    462455    void Pawn::changedVisibility(void)
    463456    {
    464457        SUPER(Pawn, changedVisibility);
    465         //this->setVisible(this->isVisible());
    466         this->setRadarVisibility(this->isVisible());
     458
     459        // enable proper radarviewability when the visibility is changed
     460        this->RadarViewable::settingsChanged();
    467461    }
    468462
  • code/trunk/src/orxonox/worldentities/pawns/Pawn.h

    r9016 r9254  
    171171            virtual const Vector3& getCarrierPosition(void) const
    172172                { return this->getWorldPosition(); };
    173             virtual void changedActivity(void); //!< To enable radarviewability when the activity is changed
    174             virtual void changedVisibility(void); //!< To enable proper radarviewability when the visibility is changed
     173
     174            virtual void changedVisibility();
    175175
    176176        protected:
Note: See TracChangeset for help on using the changeset viewer.