Changeset 6891 for code/branches/ai/src/modules/pickup/items
- Timestamp:
- May 10, 2010, 4:40:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai/src/modules/pickup/items/DronePickup.cc
r6847 r6891 134 134 135 135 //Attach to pawn 136 Drone* drone = new Drone( this);136 Drone* drone = new Drone(pawn->getCreator()); // this is neccessary because the projectiles fired need a valid creator for the particlespawner (when colliding against something) 137 137 drone->addTemplate(this->getDroneTemplate()); 138 pawn->attach(drone); 138 139 139 Controller* controller = drone->getController(); 140 140 DroneController* droneController = dynamic_cast<DroneController*>(controller); … … 143 143 droneController->setOwner(pawn); 144 144 } 145 145 146 Vector3 spawnPosition = pawn->getWorldPosition() + Vector3(30,0,-30); 147 drone->setPosition(spawnPosition); 148 146 149 //! The pickup has been used up. 147 150 this->setUsed(false);
Note: See TracChangeset
for help on using the changeset viewer.