[Orxonox-commit 2094] r6810 - in code/branches/rocket/src/modules/weapons: . projectiles weaponmodes

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


Author: gnadler
Date: 2010-04-30 14:34:37 +0200 (Fri, 30 Apr 2010)
New Revision: 6810

Modified:
   code/branches/rocket/src/modules/weapons/RocketController.cc
   code/branches/rocket/src/modules/weapons/RocketController.h
   code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc
   code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
Log:


Modified: code/branches/rocket/src/modules/weapons/RocketController.cc
===================================================================
--- code/branches/rocket/src/modules/weapons/RocketController.cc	2010-04-30 12:34:11 UTC (rev 6809)
+++ code/branches/rocket/src/modules/weapons/RocketController.cc	2010-04-30 12:34:37 UTC (rev 6810)
@@ -29,6 +29,7 @@
 #include "RocketController.h"
 #include "projectiles/SimpleRocket.h" 
 #include "util/Math.h"
+#include "weapons/projectiles/SimpleRocket.h"
 
 
 namespace orxonox
@@ -65,13 +66,13 @@
         // - apply the to myDrone (e.g. myDrone->rotateYaw(..) ) 
 
 		rocket->rotateYaw(0.2);
-			rocket->moveFrontBack(2);
+			//rocket->moveFrontBack(2);
 
     }
 
 
 
-	void setRocket(SimpleRocket* rocket, RocketController* contr) {
-			contr->setControllableEntity(dynamic_cast<ControllableEntity*> rocket);
-	}
+	//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:11 UTC (rev 6809)
+++ code/branches/rocket/src/modules/weapons/RocketController.h	2010-04-30 12:34:37 UTC (rev 6810)
@@ -29,7 +29,7 @@
 #ifndef _RocketController_H__
 #define _RocketController_H__
 
-#include "OrxonoxPrereqs.h"
+#include "weapons/WeaponsPrereqs.h"
 
 #include "controllers/Controller.h"
 #include "tools/interfaces/Tickable.h"
@@ -43,7 +43,7 @@
     @author
         Oli Scheuss
     */
-    class _OrxonoxExport RocketController : public Controller, public Tickable
+    class _WeaponsExport RocketController : public Controller, public Tickable
     {
         public:
             RocketController(BaseObject* creator);

Modified: code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc
===================================================================
--- code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc	2010-04-30 12:34:11 UTC (rev 6809)
+++ code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc	2010-04-30 12:34:37 UTC (rev 6810)
@@ -60,7 +60,7 @@
 		//this->camera_ = null;
 		RocketController* myRController = new RocketController(this);
 		this->setController(myRController);
-		myRController->setRocket(this, myRController);
+		//myRController->setRocket(this, myRController);
 		
 		//this->getController()->setControllableEntity(this);
 		//myController->setControllableEntity(this);
@@ -69,14 +69,14 @@
 
         if (GameMode::isMaster())
         {
-            this->setCollisionType(WorldEntity::Kinematic);
-            this->setVelocity(0,0,-100);
+         /*   this->setCollisionType(WorldEntity::Kinematic);
+            this->setVelocity(0,0,-100);*/
 
             Model* model = new Model(this);
             model->setMeshSource("Rocket.mesh");
-            model->scale(0.7f);
+            //model->scale(0.7f);
             this->attach(model);
-            ParticleEmitter* fire = new ParticleEmitter(this);
+           /* ParticleEmitter* fire = new ParticleEmitter(this);
             this->attach(fire);
             fire->setOrientation(this->getOrientation());
             fire->setSource("Orxonox/Rocketfire");
@@ -88,14 +88,14 @@
             ConeCollisionShape* collisionShape = new ConeCollisionShape(this);
             collisionShape->setRadius(3);
             collisionShape->setHeight(500);
-            this->attachCollisionShape(collisionShape);
+            this->attachCollisionShape(collisionShape);*/
 
             this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&SimpleRocket::destroyObject, this)));
         }
 
     }
 
-    /**
+    /**s
     @brief
         Destructor. Destroys controller, if present and kills sounds, if playing.
     */

Modified: code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
===================================================================
--- code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc	2010-04-30 12:34:11 UTC (rev 6809)
+++ code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc	2010-04-30 12:34:37 UTC (rev 6810)
@@ -45,12 +45,12 @@
     {
         RegisterObject(SimpleRocketFire);
 
-        this->reloadTime_ = 0.20f;
+      /*  this->reloadTime_ = 0.20f;
         this->bParallelReload_ = false;
         this->damage_ = 100;
         this->speed_ = 500;
 
-        this->setMunitionName("LaserMunition");
+        this->setMunitionName("LaserMunition");*/
         // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
     }
 
@@ -62,13 +62,13 @@
     {
         SimpleRocket* rocket = new SimpleRocket(this);
 
-        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
+      /*  this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
         rocket->setOrientation(this->getMuzzleOrientation());
         rocket->setPosition(this->getMuzzlePosition());
         rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
         rocket->scale(2);
 
         rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
-        rocket->setDamage(this->getDamage());
+        rocket->setDamage(this->getDamage());*/
     }
 }




More information about the Orxonox-commit mailing list