- Timestamp:
- Dec 17, 2011, 12:35:33 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2011/src/modules/overlays/hud/HUDNavigation.cc
r8988 r8993 76 76 77 77 // Set default values 78 setFont ( "Monofur" ); 79 setTextSize ( 0.05f ); 80 setNavMarkerSize ( 0.05f ); 78 this->setFont ( "Monofur" ); 79 this->setTextSize ( 0.05f ); 80 this->setNavMarkerSize ( 0.05f ); 81 this->setDetectionLimit( 10000.0f ); 81 82 } 82 83 … … 100 101 XMLPortParam ( HUDNavigation, "textSize", setTextSize, getTextSize, xmlelement, mode ); 101 102 XMLPortParam ( HUDNavigation, "navMarkerSize", setNavMarkerSize, getNavMarkerSize, xmlelement, mode ); 103 XMLPortParam ( HUDNavigation, "detectionLimit", setDetectionLimit, getDetectionLimit, xmlelement, mode ); 102 104 } 103 105 … … 175 177 176 178 unsigned int markerCount_ = 0; 179 bool closeEnough_ = false; //only display objects that are close enough to be relevant for the player 177 180 178 181 // for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); ++it) … … 180 183 { 181 184 ObjectMap::iterator it = activeObjectList_.find ( listIt->first ); 182 183 if ( markerCount_ < markerLimit_ ) 185 closeEnough_ = listIt->second < detectionLimit_ ; 186 // display radarviewables on HUD if the marker limit and max-distance is not exceeded 187 if ( markerCount_ < markerLimit_ && (closeEnough_ || detectionLimit_ < 0) ) 184 188 { 185 189 … … 307 311 it->second.text_->show(); 308 312 } 309 else 313 else // do not display on HUD 310 314 { 311 315 it->second.panel_->hide();
Note: See TracChangeset
for help on using the changeset viewer.