Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 14, 2010, 12:41:04 PM (15 years ago)
Author:
gnadler
Message:

rockentcontroller doesn't control the rocket it spawns itself.
Rocket collides wih asteroids& at least drones but does not despawn.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc

    r6863 r6900  
    6161    void SimpleRocketFire::fire()
    6262    {
    63         //SimpleRocket* rocket = new SimpleRocket(this);
    6463                RocketController* con = new RocketController(this);
    6564                SimpleRocket* rocket = con->getRocket();
     
    6968        rocket->setPosition(pos);
    7069                rocket->setVelocity(this->getMuzzleDirection()*this->speed_);
    71                 //Ogre::Vector3 vec = this->getMuzzlePosition();
    72                 //vec.normalise();
    73                 //rocket->setAcceleration(100*vec);
    7470                rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    75                 //con->getRocket()->setPosition(this->getMuzzlePosition());
    76         //con->setControllableEntity(dynamic_cast<rocket*>(ControllableEntity));
    77         //con->getControllableEntity()->setPosition(this->getMuzzlePosition());
    78 
    79         /* this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    80         rocket->setOrientation(this->getMuzzleOrientation());
    81         rocket->setPosition(this->getMuzzlePosition());
    82                 rocket->scale(10);
    83         rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
    84         rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    85         rocket->setDamage(this->getDamage());
    86         rocket->scale(2);
    87                 */
    8871    }
    8972}
Note: See TracChangeset for help on using the changeset viewer.