[Orxonox-commit 5630] r10290 - in code/trunk/src: modules/weapons/weaponmodes orxonox/controllers

landauf at orxonox.net landauf at orxonox.net
Sun Mar 1 14:17:08 CET 2015


Author: landauf
Date: 2015-03-01 14:17:08 +0100 (Sun, 01 Mar 2015)
New Revision: 10290

Modified:
   code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
   code/trunk/src/orxonox/controllers/FormationController.cc
Log:
details

Modified: code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/HsW01.cc	2015-03-01 13:16:34 UTC (rev 10289)
+++ code/trunk/src/modules/weapons/weaponmodes/HsW01.cc	2015-03-01 13:17:08 UTC (rev 10290)
@@ -64,7 +64,7 @@
         this->sound_ = "sounds/Weapon_HsW01.ogg";
 
 
-        this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&HsW01::shot, this)));
+        this->delayTimer_.setTimer(this->delay_, false, createExecutor(createFunctor(&HsW01::shot, this)));
         this->delayTimer_.stopTimer();
 
         this->setDefaultSound(this->sound_);

Modified: code/trunk/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/FormationController.cc	2015-03-01 13:16:34 UTC (rev 10289)
+++ code/trunk/src/orxonox/controllers/FormationController.cc	2015-03-01 13:17:08 UTC (rev 10290)
@@ -677,7 +677,7 @@
            {
                (*it)->state_=FREE;
                (*it)->forceFreedom();
-               (*it)->target_=originator;
+               (*it)->setTarget(originator);
            }
            i++;
            if (i>=slaves_.size()/2) break; //half the formation should attack.
@@ -934,8 +934,7 @@
                 if (!this->target_ || it->getPosition().squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceNew) / speed / distanceNew.length()) / math::twoPi)
                         < this->targetPosition_.squaredDistance(this->getControllableEntity()->getPosition()) * (1.5f + acos((this->getControllableEntity()->getOrientation() * WorldEntity::FRONT).dotProduct(distanceCurrent) / speed / distanceCurrent.length()) / math::twoPi) + rnd(-250, 250))
                 {
-                    this->target_ = (*it);
-                    this->targetPosition_ = it->getPosition();
+                    this->setTarget(*it);
                 }
             }
         }




More information about the Orxonox-commit mailing list