[Orxonox-commit 6938] r11559 - in code/branches/Waypoints_HS17: data/levels src/modules/questsystem src/orxonox/worldentities

jostoffe at orxonox.net jostoffe at orxonox.net
Mon Nov 13 16:16:36 CET 2017


Author: jostoffe
Date: 2017-11-13 16:16:35 +0100 (Mon, 13 Nov 2017)
New Revision: 11559

Modified:
   code/branches/Waypoints_HS17/data/levels/emptyLevel.oxw
   code/branches/Waypoints_HS17/src/modules/questsystem/Quest.cc
   code/branches/Waypoints_HS17/src/orxonox/worldentities/Arrow.cc
   code/branches/Waypoints_HS17/src/orxonox/worldentities/Arrow.h
Log:
Pfeil wird angezeigt und fliegt mit dem Raumschiff mit, aber er ist noch nicht an der richtigen Position. Dazu muss ich noch die richtige Formel finden anhand der momentanen Ausrichtung des Raumschiffes

Modified: code/branches/Waypoints_HS17/data/levels/emptyLevel.oxw
===================================================================
--- code/branches/Waypoints_HS17/data/levels/emptyLevel.oxw	2017-11-13 15:14:47 UTC (rev 11558)
+++ code/branches/Waypoints_HS17/data/levels/emptyLevel.oxw	2017-11-13 15:16:35 UTC (rev 11559)
@@ -50,7 +50,7 @@
 
 
     
-    <SpawnPoint position="50,0,0" lookat="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+    <SpawnPoint position="50,0,0" direction="0,1,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
 
 
     
@@ -59,14 +59,11 @@
       <attached>
        <Model scale="10" mesh="arrow.mesh"/>
       </attached>
-      <controllers>
-        <ArrowController>
-        </ArrowController>
-      </controllers>
     </Arrow>
 
+<ArrowController>
+        </ArrowController>
 
-
   </Scene>
 </Level>
 

Modified: code/branches/Waypoints_HS17/src/modules/questsystem/Quest.cc
===================================================================
--- code/branches/Waypoints_HS17/src/modules/questsystem/Quest.cc	2017-11-13 15:14:47 UTC (rev 11558)
+++ code/branches/Waypoints_HS17/src/modules/questsystem/Quest.cc	2017-11-13 15:16:35 UTC (rev 11559)
@@ -79,18 +79,18 @@
         XMLPortObject(Quest, QuestHint, "hints", addHint, getHint, xmlelement, mode);
         XMLPortObject(Quest, QuestEffect, "fail-effects", addFailEffect, getFailEffect, xmlelement, mode);
         XMLPortObject(Quest, QuestEffect, "complete-effects", addCompleteEffect, getCompleteEffect, xmlelement, mode);
-        XMLPortObject(Quest, Worldentity, "arrowtarget", addArrowTarget, getArrowTarget, xmlelement, mode);
+        //XMLPortObject(Quest, Worldentity, "arrowtarget", addArrowTarget, getArrowTarget, xmlelement, mode);
 
         QuestManager::getInstance().registerQuest(this); // Registers the Quest with the QuestManager.
     }
 
 
-    bool Quest::addArrowTarget(Quest* quest){
+    /*bool Quest::addArrowTarget(Quest* quest){
 
         assert(quest);
 
 
-    }
+    }*/
 
 
 

Modified: code/branches/Waypoints_HS17/src/orxonox/worldentities/Arrow.cc
===================================================================
--- code/branches/Waypoints_HS17/src/orxonox/worldentities/Arrow.cc	2017-11-13 15:14:47 UTC (rev 11558)
+++ code/branches/Waypoints_HS17/src/orxonox/worldentities/Arrow.cc	2017-11-13 15:16:35 UTC (rev 11559)
@@ -48,7 +48,7 @@
         // Register the drone class to the core.
         RegisterObject(Arrow);
 
-        this->myController_ = NULL;
+        //this->myController_ = NULL;
 
         this->localLinearAcceleration_.setValue(0, 0, 0);
         this->localAngularAcceleration_.setValue(0, 0, 0);
@@ -68,8 +68,8 @@
     Arrow::~Arrow()
     {
         // Deletes the controller if the object was initialized and the pointer to the controller is not NULL.
-        if( this->isInitialized() && this->myController_ != NULL )
-            delete this->myController_;
+       // if( this->isInitialized() && this->myController_ != NULL )
+            //delete this->myController_;
     }
 
     /**
@@ -183,4 +183,5 @@
         this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
     }
 
+
 }

Modified: code/branches/Waypoints_HS17/src/orxonox/worldentities/Arrow.h
===================================================================
--- code/branches/Waypoints_HS17/src/orxonox/worldentities/Arrow.h	2017-11-13 15:14:47 UTC (rev 11558)
+++ code/branches/Waypoints_HS17/src/orxonox/worldentities/Arrow.h	2017-11-13 15:16:35 UTC (rev 11559)
@@ -32,9 +32,10 @@
 #include "OrxonoxPrereqs.h"
 
 #include "core/XMLPort.h"
-#include "controllers/ArrowController.h"
+//#include "controllers/ArrowController.h"
 
 #include "ControllableEntity.h"
+#include "WorldEntity.h"
 
 namespace orxonox {
 
@@ -131,7 +132,7 @@
             //TODO: Place your get-functions here.
 
         private:
-            ArrowController *myController_; //!< The controller of the Arrow.
+            //ArrowController *myController_; //!< The controller of the Arrow.
 
             btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the Arrow the next tick.
             btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the Arrow the next tick.



More information about the Orxonox-commit mailing list