[Orxonox-commit 2231] r6947 - code/branches/presentation3/src/modules/overlays/hud

scheusso at orxonox.net scheusso at orxonox.net
Fri May 21 08:36:32 CEST 2010


Author: scheusso
Date: 2010-05-21 08:36:32 +0200 (Fri, 21 May 2010)
New Revision: 6947

Modified:
   code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.cc
Log:
fixed a bug which caused a segfault when shooting a rocket


Modified: code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.cc	2010-05-20 20:46:15 UTC (rev 6946)
+++ code/branches/presentation3/src/modules/overlays/hud/HUDNavigation.cc	2010-05-21 06:36:32 UTC (rev 6947)
@@ -133,7 +133,7 @@
         for (ObjectMap::iterator it = activeObjectList_.begin(); it != activeObjectList_.end(); ++it)
         {
             // Get Distance to HumanController and save it in the TextAreaOverlayElement.
-            int dist = (int)((it->first->getRVWorldPosition() - HumanController::getLocalControllerEntityAsPawn()->getWorldPosition()).length() + 0.5f);
+            int dist = (int)((it->first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f);
             it->second.text_->setCaption(multi_cast<std::string>(dist));
             float textLength = multi_cast<std::string>(dist).size() * it->second.text_->getCharHeight() * 0.3f;
 




More information about the Orxonox-commit mailing list