Changeset 7035
- Timestamp:
- May 31, 2010, 7:43:51 AM (15 years ago)
- Location:
- code/branches/presentation3/src/orxonox/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/orxonox/controllers/ArtificialController.cc
r7034 r7035 30 30 31 31 #include <vector> 32 #include "limits.h" 32 33 #include "core/CoreIncludes.h" 33 34 #include "core/XMLPort.h" -
code/branches/presentation3/src/orxonox/controllers/DroneController.cc
r7034 r7035 76 76 float maxrand = 100.0f / ACTION_INTERVAL; 77 77 78 const Vector3& ownerPosition = getOwner()->getWorldPosition();79 const Vector3& dronePosition = getDrone()->getWorldPosition();78 // const Vector3& ownerPosition = getOwner()->getWorldPosition(); 79 // const Vector3& dronePosition = getDrone()->getWorldPosition(); 80 80 81 const Vector3& locOwnerDir = getDrone()->getOrientation().UnitInverse()*(ownerPosition-dronePosition); //Vector from Drone To Owner out of drones local coordinate system81 // const Vector3& locOwnerDir = getDrone()->getOrientation().UnitInverse()*(ownerPosition-dronePosition); //Vector from Drone To Owner out of drones local coordinate system 82 82 83 83 random = rnd(maxrand); … … 105 105 void DroneController::tick(float dt) 106 106 { 107 108 109 Drone *myDrone = static_cast<Drone*>(this->getControllableEntity()); 107 // Drone *myDrone = static_cast<Drone*>(this->getControllableEntity()); 110 108 float maxDistanceSquared = this->getDrone()->getMaxDistanceToOwner()*this->getDrone()->getMaxDistanceToOwner(); 111 109 float minDistanceSquared = this->getDrone()->getMinDistanceToOwner()*this->getDrone()->getMinDistanceToOwner(); … … 126 124 else if((int)randomSelection==5) drone_->rotateRoll(random); 127 125 } 126 128 127 SUPER(AIController, tick, dt); 129 128
Note: See TracChangeset
for help on using the changeset viewer.