[Orxonox-commit 5015] r9681 - in code/branches/tutorial4/src/orxonox: controllers worldentities
smerkli at orxonox.net
smerkli at orxonox.net
Mon Sep 30 13:18:18 CEST 2013
Author: smerkli
Date: 2013-09-30 13:18:18 +0200 (Mon, 30 Sep 2013)
New Revision: 9681
Modified:
code/branches/tutorial4/src/orxonox/controllers/AutonomousDroneController.cc
code/branches/tutorial4/src/orxonox/worldentities/AutonomousDrone.cc
Log:
Quick fix to make things work in the tutorial. Will be reverted to
a cleaner way soon.
Modified: code/branches/tutorial4/src/orxonox/controllers/AutonomousDroneController.cc
===================================================================
--- code/branches/tutorial4/src/orxonox/controllers/AutonomousDroneController.cc 2013-09-30 08:46:17 UTC (rev 9680)
+++ code/branches/tutorial4/src/orxonox/controllers/AutonomousDroneController.cc 2013-09-30 11:18:18 UTC (rev 9681)
@@ -47,9 +47,10 @@
// This checks that our context really is a drone
// and saves the pointer to the drone for the controlling commands
- AutonomousDrone* drone = dynamic_cast<AutonomousDrone*>(context);
- assert(drone != NULL);
- this->setControllableEntity(drone);
+ /* NOTE from Sandro: This is currently broken */
+ //AutonomousDrone* drone = dynamic_cast<AutonomousDrone*>(context);
+ //assert(drone != NULL);
+ //this->setControllableEntity(drone);
}
/**
@@ -69,7 +70,12 @@
*/
void AutonomousDroneController::tick(float dt)
{
- AutonomousDrone *myDrone = static_cast<AutonomousDrone*>(this->getControllableEntity());
+ /* NOTE: Ugly hack by Sandro to make the tutorial work for the moment.
+ * This will be reverted once the framework update is complete
+ */
+ //AutonomousDrone *myDrone = static_cast<AutonomousDrone*>(this->getControllableEntity());
+ ObjectList<AutonomousDrone>::iterator it = ObjectList<AutonomousDrone>::begin();
+
//TODO: Place your code here:
// Steering commands
// You can use the commands provided by the AutonomousDrone to steer it:
Modified: code/branches/tutorial4/src/orxonox/worldentities/AutonomousDrone.cc
===================================================================
--- code/branches/tutorial4/src/orxonox/worldentities/AutonomousDrone.cc 2013-09-30 08:46:17 UTC (rev 9680)
+++ code/branches/tutorial4/src/orxonox/worldentities/AutonomousDrone.cc 2013-09-30 11:18:18 UTC (rev 9681)
@@ -57,7 +57,7 @@
this->setCollisionType(WorldEntity::Dynamic);
- this->myController_ = new AutonomousDroneController(this); // Creates a new controller and passes our this pointer to it as creator.
+ //this->myController_ = new AutonomousDroneController(this); // Creates a new controller and passes our this pointer to it as creator.
}
/**
More information about the Orxonox-commit
mailing list