Changeset 9484 for code/branches/spaceNavigation
- Timestamp:
- Dec 3, 2012, 3:57:02 PM (12 years ago)
- Location:
- code/branches/spaceNavigation/src/modules/overlays/hud
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spaceNavigation/src/modules/overlays/hud/HUDNavigation.cc
r9471 r9484 216 216 } 217 217 218 219 218 // Selected object 220 219 if(this->closestTarget_) { … … 223 222 { 224 223 it->second.selected_ = true; 225 } else { 224 orxout() << "Closest object selected" << std::endl; 225 } 226 else if(it->second.selected_) 227 { 226 228 it->second.selected_ = false; 227 } 228 closestTarget_ = false; 229 orxout() << "Closest object selected" << std::endl; 230 } 229 orxout() << "Previous object unselected" << std::endl; 230 } 231 232 } 233 // select the next closest object 231 234 else if(this->nextTarget_) 232 235 { 233 // select the next closest object234 236 if(nextHasToBeSelected){ 235 237 it->second.selected_ = true; 236 238 nextHasToBeSelected = false; 237 this->nextTarget_ = false;239 orxout() << "Next object selected" << std::endl; 238 240 } 239 241 else if(it->second.selected_) … … 241 243 nextHasToBeSelected = true; 242 244 it->second.selected_ = false; 243 } 244 else if(markerCount + 1 >= markerLimit_) 245 { 246 // this object is the last one that is marked, then select the closest 247 this->activeObjectList_.find(this->sortedObjectList_.begin()->first)->second.selected_ = true; 248 nextHasToBeSelected = false; 249 } 245 orxout() << "Previous object unselected" << std::endl; 246 247 listIt++; 248 249 if (markerCount + 1 >= this->markerLimit_ || 250 (listIt->second > this->detectionLimit_ 251 && detectionLimit_ >= 0)) 252 { 253 this->activeObjectList_.find(this->sortedObjectList_.begin()->first)->second.selected_ = true; 254 nextHasToBeSelected = false; 255 } 256 257 listIt--; 258 } 259 260 250 261 } 251 262 … … 398 409 } 399 410 } 411 412 this->closestTarget_ = false; 413 this->nextTarget_ = false; 400 414 } 401 415 -
code/branches/spaceNavigation/src/modules/overlays/hud/HUDNavigation.h
r9472 r9484 130 130 bool nextTarget_; 131 131 132 static const float LIGHTNING_GUN_SPEED_ = 700.0f;133 static const float HSW01_SPEED_ = 2500.0f;134 132 static HUDNavigation* localHUD_s; //!< This is used as a filter. Only the local HUD should be influenced by the static Console Command functions. 135 133
Note: See TracChangeset
for help on using the changeset viewer.