[Orxonox-commit 5929] r10588 - code/branches/towerdefenseFabien/src/modules/towerdefense

landauf at orxonox.net landauf at orxonox.net
Tue Sep 15 16:44:29 CEST 2015


Author: landauf
Date: 2015-09-15 16:44:28 +0200 (Tue, 15 Sep 2015)
New Revision: 10588

Modified:
   code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.cc
Log:
use the new entity as waypoint (each WaypointController will destroy its waypoints when it is destroyed -> each controller must have its own waypoints)

Modified: code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.cc	2015-09-15 14:43:03 UTC (rev 10587)
+++ code/branches/towerdefenseFabien/src/modules/towerdefense/TowerDefense.cc	2015-09-15 14:44:28 UTC (rev 10588)
@@ -208,7 +208,7 @@
             {
                 orxonox::WeakPtr<MovableEntity> waypoint = new MovableEntity(this->center_->getContext());
                 waypoint->setPosition(waypoints_.at(i)->getPosition());
-                controller->addWaypoint(waypoints_.at(i));
+                controller->addWaypoint(waypoint);
             }
         }
 




More information about the Orxonox-commit mailing list