[Orxonox-commit 5578] r10241 - in code/branches/hudHS14: data/overlays src/modules/overlays/hud

landauf at orxonox.net landauf at orxonox.net
Sun Feb 1 20:57:37 CET 2015


Author: landauf
Date: 2015-02-01 20:57:37 +0100 (Sun, 01 Feb 2015)
New Revision: 10241

Modified:
   code/branches/hudHS14/data/overlays/HUDTemplates3.oxo
   code/branches/hudHS14/src/modules/overlays/hud/HUDEnemyHealthBar.cc
   code/branches/hudHS14/src/modules/overlays/hud/HUDHealthBar.cc
Log:
cleanup

Modified: code/branches/hudHS14/data/overlays/HUDTemplates3.oxo
===================================================================
--- code/branches/hudHS14/data/overlays/HUDTemplates3.oxo	2015-02-01 19:52:31 UTC (rev 10240)
+++ code/branches/hudHS14/data/overlays/HUDTemplates3.oxo	2015-02-01 19:57:37 UTC (rev 10241)
@@ -35,7 +35,7 @@
      background        = "Orxonox/HealthBarBackground"
      size              = "0.35, 0.0875"
      position          = "0.0 , 0.9 "
-     pickpoint         = "0, 1"       
+     pickpoint         = "0, 1"
      bartexture        = "healthbar_bar.png"
      textfont          = "VeraMono"
      textusebarcolour  = true

Modified: code/branches/hudHS14/src/modules/overlays/hud/HUDEnemyHealthBar.cc
===================================================================
--- code/branches/hudHS14/src/modules/overlays/hud/HUDEnemyHealthBar.cc	2015-02-01 19:52:31 UTC (rev 10240)
+++ code/branches/hudHS14/src/modules/overlays/hud/HUDEnemyHealthBar.cc	2015-02-01 19:57:37 UTC (rev 10241)
@@ -30,7 +30,6 @@
 
 #include "core/config/ConfigValueIncludes.h"
 #include "worldentities/pawns/Pawn.h"
-#include "graphics/Camera.h"
 
 namespace orxonox
 {
@@ -57,49 +56,6 @@
     {
         this->updateTarget();
 
-
-
-/*
-//--------------------------------------------------------------------------
-        //first try to place a healthbar under the enemy ship
-        //getting all the parameters (direction, position, angle) to place the health bar on the screen
-
-        Camera* camera = this->owner_->getCamera();
-
-        //position and orientation relative to the root space
-        Vector3 cameraPosition = camera->getWorldPosition();
-        Quaternion cameraOrientation = camera->getWorldOrientation();
-
-        Vector3 cameraDirection = camera->FRONT;
-        Vector3 cameraOrthonormal = camera->UP;
-
-        //get target
-        //if there is one get it's position (relative to the root space(
-        WorldEntity* target = this->owner_->getTarget();
-
-        if(target != NULL){
-        Vector3 targetPosition = target->getWorldPosition();
-
-
-        //try 1
-        Vector2 screenCoordinates = get2DViewcoordinates(cameraPosition, cameraOrientation * WorldEntity::FRONT, cameraOrientation * WorldEntity::UP, targetPosition);
-
-        orxout() << screenCoordinates.x << endl;
-
-        //shift coordinates because the screen has it's root in the upper left corner (0,0) but get2Dviewcoordiantes return values between -0.5 and 0.5
-        screenCoordinates.x += 0.5;
-        screenCoordinates.y += 0.5;
-        orxout() << screenCoordinates.x << endl;
-
-        this->setPosition(screenCoordinates);
-
-        this->setTextOffset(screenCoordinates);
-        }
-        //--------------------------------------------------------------------------
-*/
-
-
-
         SUPER(HUDEnemyHealthBar, tick, dt);
     }
 
@@ -114,13 +70,10 @@
             while (target && !target->isA(Class(Pawn)))
                 target = target->getParent();
             pawn = orxonox_cast<Pawn*>(target);
-
-
             // Don't show the HealthBar if the pawn is invisible
             if (pawn && !pawn->isVisible())
                 pawn = NULL;
         }
-
         // Set the pawn as owner of the HealthBar
         this->setHealthBarOwner(pawn);
         this->setVisible(pawn != NULL);

Modified: code/branches/hudHS14/src/modules/overlays/hud/HUDHealthBar.cc
===================================================================
--- code/branches/hudHS14/src/modules/overlays/hud/HUDHealthBar.cc	2015-02-01 19:52:31 UTC (rev 10240)
+++ code/branches/hudHS14/src/modules/overlays/hud/HUDHealthBar.cc	2015-02-01 19:57:37 UTC (rev 10241)
@@ -82,10 +82,6 @@
     {
         SUPER(HUDHealthBar, tick, dt);
 
-
-
-
-
         if (this->owner_)
         {
             this->setValue(this->owner_->getHealth() / this->owner_->getInitialHealth());




More information about the Orxonox-commit mailing list