Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 10, 2010, 4:40:44 PM (15 years ago)
Author:
gasserlu
Message:

DroneController modified, sameTeam() mod. hack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ai/src/modules/pickup/items/DronePickup.cc

    r6847 r6891  
    134134               
    135135                //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)
    137137                drone->addTemplate(this->getDroneTemplate());
    138                 pawn->attach(drone);
     138
    139139                Controller* controller = drone->getController();
    140140                DroneController* droneController = dynamic_cast<DroneController*>(controller);
     
    143143                    droneController->setOwner(pawn);
    144144                }
    145 
     145               
     146                Vector3 spawnPosition = pawn->getWorldPosition() + Vector3(30,0,-30);
     147                drone->setPosition(spawnPosition);
     148               
    146149                //! The pickup has been used up.
    147150                this->setUsed(false);
Note: See TracChangeset for help on using the changeset viewer.