[Orxonox-commit 7289] r11906 - code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns

adamc at orxonox.net adamc at orxonox.net
Thu Apr 26 14:45:47 CEST 2018


Author: adamc
Date: 2018-04-26 14:45:47 +0200 (Thu, 26 Apr 2018)
New Revision: 11906

Modified:
   code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/CMakeLists.txt
   code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/SpaceShip.cc
   code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/SpaceShip.h
Log:
scriptablecontroller can move and kill pawn

Modified: code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/CMakeLists.txt
===================================================================
--- code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/CMakeLists.txt	2018-04-26 11:48:45 UTC (rev 11905)
+++ code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/CMakeLists.txt	2018-04-26 12:45:47 UTC (rev 11906)
@@ -3,6 +3,7 @@
   Spectator.cc
   Pawn.cc
   SpaceShip.cc
+  AAAAutonomousDrone.cc
   ModularSpaceShip.cc
   TeamBaseMatchBase.cc
   Destroyer.cc

Modified: code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/SpaceShip.cc	2018-04-26 11:48:45 UTC (rev 11905)
+++ code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/SpaceShip.cc	2018-04-26 12:45:47 UTC (rev 11906)
@@ -162,7 +162,7 @@
         for(Engine* engine : this->engineList_)
             engine->run(dt);
 
-        if (this->hasLocalController())
+        if (this->hasLocalController() || true)
         {
             // If not in mouse look apply the angular movement to the ship.
             if (!this->isInMouseLook())

Modified: code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/SpaceShip.h	2018-04-26 11:48:45 UTC (rev 11905)
+++ code/branches/ScriptableController_FS18/src/orxonox/worldentities/pawns/SpaceShip.h	2018-04-26 12:45:47 UTC (rev 11906)
@@ -116,6 +116,13 @@
             virtual void moveUpDown(const Vector2& value)
                 { this->steering_.y += value.x; }
 
+            inline void moveFrontBack(float value)
+                { this->moveFrontBack(Vector2(value, 0)); }
+            inline void moveRightLeft(float value)
+                { this->moveRightLeft(Vector2(value, 0)); }
+            inline void moveUpDown(float value)
+                { this->moveUpDown(Vector2(value, 0)); }    
+
             virtual void rotateYaw(const Vector2& value); // Rotate in yaw direction.
             virtual void rotatePitch(const Vector2& value); // Rotate in pitch direction.
             virtual void rotateRoll(const Vector2& value); // Rotate in roll direction.



More information about the Orxonox-commit mailing list