Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 3, 2010, 1:40:16 PM (15 years ago)
Author:
gnadler
Message:

Success:
Now rocket spawns somewhere around the ship and the orientation is more or less correct. The controller does nothing but change some pitch/roll (to be sure it does something).
I modified the rocketfire particle to produce rocketfire2.particle which is slightly smaller and matches the smaller rocket.

File:
1 edited

Legend:

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

    r6827 r6834  
    4545    {
    4646        RegisterObject(SimpleRocketFire);
     47               
    4748
    4849      /*  this->reloadTime_ = 0.20f;
     
    6162    void SimpleRocketFire::fire()
    6263    {
    63         SimpleRocket* rocket = new SimpleRocket(this);
    64         RocketController* con = new RocketController(this);
     64        //SimpleRocket* rocket = new SimpleRocket(this);
     65                RocketController* con = new RocketController(this);
     66                SimpleRocket* rocket = con->getRocket();
     67                this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
     68                rocket->setOrientation(this->getMuzzleOrientation());
     69        rocket->setPosition(this->getMuzzlePosition());
     70                rocket->setVelocity(this->getMuzzleDirection() * rocket->getVelocity());
     71                rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
     72                //con->getRocket()->setPosition(this->getMuzzlePosition());
     73        //con->setControllableEntity(dynamic_cast<ControllableEntity*>(rocket));
     74        //con->getControllableEntity()->setPosition(this->getMuzzlePosition());
    6575
    66 
    67         this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
     76        /* this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    6877        rocket->setOrientation(this->getMuzzleOrientation());
    6978        rocket->setPosition(this->getMuzzlePosition());
    70         rocket->scale(10);
     79                rocket->scale(10);
    7180        rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
    7281        rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    73         rocket->setDamage(this->getDamage());
    74         //rocket->scale(2);
    75 
     82        rocket->setDamage(this->getDamage()); 
     83        rocket->scale(2);
     84                */
    7685    }
    7786}
Note: See TracChangeset for help on using the changeset viewer.