Changeset 6273 for code/branches/presentation2/src/modules
- Timestamp:
- Dec 8, 2009, 11:48:52 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/modules/overlays/hud/HUDNavigation.cc
r5929 r6273 41 41 #include "Scene.h" 42 42 #include "Radar.h" 43 #include "controllers/HumanController.h" 44 #include "worldentities/pawns/Pawn.h" 43 45 44 46 namespace orxonox … … 253 255 float HUDNavigation::getDist2Focus() const 254 256 { 255 /* 256 if (Radar::getInstance().getFocus()) 257 return (Radar::getInstance().getFocus()->getRVWorldPosition() - SpaceShip::getLocalShip()->getPosition()).length(); 258 else 259 */ 257 Radar* radar = this->getOwner()->getScene()->getRadar(); 258 if (radar->getFocus() && HumanController::getLocalControllerEntityAsPawn()) 259 return (radar->getFocus()->getRVWorldPosition() - HumanController::getLocalControllerEntityAsPawn()->getWorldPosition()).length(); 260 else 260 261 return 0; 261 262 }
Note: See TracChangeset
for help on using the changeset viewer.