[Orxonox-commit 2111] r6827 - in code/branches/rocket/src/modules/weapons: projectiles weaponmodes

scheusso at orxonox.net scheusso at orxonox.net
Mon May 3 11:20:00 CEST 2010


Author: scheusso
Date: 2010-05-03 11:20:00 +0200 (Mon, 03 May 2010)
New Revision: 6827

Modified:
   code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc
   code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
Log:
rocket does spawn and is visible now
however speed and scaling not yet correct


Modified: code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc
===================================================================
--- code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc	2010-05-03 00:35:03 UTC (rev 6826)
+++ code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc	2010-05-03 09:20:00 UTC (rev 6827)
@@ -75,7 +75,7 @@
             this->setVelocity(0,0,-100);*/
 
             Model* model = new Model(this);
-            model->setMeshSource("Rocket.mesh");
+            model->setMeshSource("rocket.mesh");
             //model->scale(0.7f);
             this->attach(model);
            /* ParticleEmitter* fire = new ParticleEmitter(this);

Modified: code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
===================================================================
--- code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc	2010-05-03 00:35:03 UTC (rev 6826)
+++ code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc	2010-05-03 09:20:00 UTC (rev 6827)
@@ -60,17 +60,18 @@
 
     void SimpleRocketFire::fire()
     {
-        //SimpleRocket* rocket = new SimpleRocket(this);
-		RocketController* con = new RocketController(this);
+        SimpleRocket* rocket = new SimpleRocket(this);
+	RocketController* con = new RocketController(this);
 
 
         this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
-        con->getControllableEntity()->setOrientation(this->getMuzzleOrientation());
-        con->getControllableEntity()->setPosition(this->getMuzzlePosition());
-        /* rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
-        rocket->scale(2);
+        rocket->setOrientation(this->getMuzzleOrientation());
+        rocket->setPosition(this->getMuzzlePosition());
+	rocket->scale(10);
+        rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
+        rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
+        rocket->setDamage(this->getDamage());
+        //rocket->scale(2);
 
-        rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
-        rocket->setDamage(this->getDamage());*/
     }
 }




More information about the Orxonox-commit mailing list