[Orxonox-commit 2095] r6811 - code/branches/rocket/src/modules/weapons

gnadler at orxonox.net gnadler at orxonox.net
Fri Apr 30 14:39:30 CEST 2010


Author: gnadler
Date: 2010-04-30 14:39:30 +0200 (Fri, 30 Apr 2010)
New Revision: 6811

Modified:
   code/branches/rocket/src/modules/weapons/RocketController.cc
   code/branches/rocket/src/modules/weapons/RocketController.h
Log:


Modified: code/branches/rocket/src/modules/weapons/RocketController.cc
===================================================================
--- code/branches/rocket/src/modules/weapons/RocketController.cc	2010-04-30 12:34:37 UTC (rev 6810)
+++ code/branches/rocket/src/modules/weapons/RocketController.cc	2010-04-30 12:39:30 UTC (rev 6811)
@@ -20,7 +20,7 @@
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  *   Author:
- *      Oli Scheuss
+ *     Gabriel Nadler, Originalfile: Oli Scheuss
  *   Co-authors:
  *      ...
  *
@@ -40,12 +40,9 @@
     */
     RocketController::RocketController(BaseObject* creator) : Controller(creator)
     {
-        // Place your code here:
-        // - make sure to register the object in the factory
-        // - do any kind of initialisation
+
         RegisterObject(RocketController);
-        // this checks that our creator really is a drone
-        // and saves the pointer to the drone for the controlling commands
+
     }
 
 
@@ -57,21 +54,20 @@
     */
     void RocketController::tick(float dt)
     {
-        // Place your code here:
-        // - steering commands
+
         SimpleRocket *rocket = static_cast<SimpleRocket*>(this->getControllableEntity());
-        // you can use the following commands for steering 
-        // - moveFrontBack, moveRightLeft, moveUpDown 
-        // - rotatePitch, rotateYaw, rotateRoll 
-        // - apply the to myDrone (e.g. myDrone->rotateYaw(..) ) 
 
+
 		rocket->rotateYaw(0.2);
 			//rocket->moveFrontBack(2);
 
     }
 
+	/*
+	I wanted to define the controllable entity with this function but the compiler gives the error: line 80: rocket - unidentified identifier
+	or some similar error.
+	*/
 
-
 	//void setRocket(SimpleRocket* rocket, RocketController* contr) {
 	//		contr->setControllableEntity(dynamic_cast<ControllableEntity*> rocket);
 	//}

Modified: code/branches/rocket/src/modules/weapons/RocketController.h
===================================================================
--- code/branches/rocket/src/modules/weapons/RocketController.h	2010-04-30 12:34:37 UTC (rev 6810)
+++ code/branches/rocket/src/modules/weapons/RocketController.h	2010-04-30 12:39:30 UTC (rev 6811)
@@ -20,7 +20,7 @@
  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  *   Author:
- *      Oli Scheuss
+ *      Gabriel Nadler, Originalfile: Oli Scheuss
  *   Co-authors:
  *      ...
  *
@@ -41,7 +41,7 @@
     @brief
         Controller for the Drone of the PPS tutorial.
     @author
-        Oli Scheuss
+        Gabriel Nadler, Originalfile: Oli Scheuss
     */
     class _WeaponsExport RocketController : public Controller, public Tickable
     {
@@ -50,8 +50,7 @@
 			virtual ~RocketController(){};
 			void setRocket(SimpleRocket* rocket, RocketController* contr);
             
-            virtual void tick(float dt); //!< The controlling happens here. This method defines what the controller has to do each tick.
-
+            virtual void tick(float dt);
         protected:
 
 




More information about the Orxonox-commit mailing list