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'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ai2/src/modules/overlays/hud/HUDRadar.cc

    r8874 r8875  
    124124
    125125    void HUDRadar::objectChanged( RadarViewable* rv )
    126     {
    127         if(rv == dynamic_cast<RadarViewable*>(this->owner_)) //case: player changed
    128             return;
    129         if( showObject(rv) == false ) //case: (radar) invisible object changed
    130             return;
    131         if( this->radarObjects_.find(rv) == this->radarObjects_.end() ) // if (radar) invisibility becomes (radar) visible
    132             this->addObject(rv);
    133         assert( this->radarObjects_.find(rv) != this->radarObjects_.end() );
    134         Ogre::PanelOverlayElement* panel = this->radarObjects_[rv];
    135         panel->setMaterialName(TextureGenerator::getMaterialName(
    136             shapeMaterials_[rv->getRadarObjectShape()], rv->getRadarObjectColour()));
     126    {// The new implementation behaves more precisely, since inactive RadarViewables are not displayed anymore.
     127        this->removeObject(rv);
     128        this->addObject(rv);
    137129    }
    138130
Note: See TracChangeset for help on using the changeset viewer.