Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 7, 2010, 4:14:18 PM (15 years ago)
Author:
gnadler
Message:

orxonox crashes while, respectively after destroying either the Rocket or the Controller.

File:
1 edited

Legend:

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

    r6834 r6863  
    4545    {
    4646        RegisterObject(SimpleRocketFire);
    47                
    4847
    49       /*  this->reloadTime_ = 0.20f;
     48        this->reloadTime_ = 0.20f;
    5049        this->bParallelReload_ = false;
    5150        this->damage_ = 100;
    52         this->speed_ = 500;
     51        this->speed_ = 50;
    5352
    54         this->setMunitionName("LaserMunition");*/
     53        this->setMunitionName("LaserMunition");
    5554        // The firing sound of the Rocket is played in Rocket.cc (because of OpenAl sound positioning)
    5655    }
     
    6766                this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    6867                rocket->setOrientation(this->getMuzzleOrientation());
    69         rocket->setPosition(this->getMuzzlePosition());
    70                 rocket->setVelocity(this->getMuzzleDirection() * rocket->getVelocity());
     68                Vector3 pos = this->getMuzzlePosition() + (this->getMuzzleOrientation()* Vector3(-2, -3, -2));
     69        rocket->setPosition(pos);
     70                rocket->setVelocity(this->getMuzzleDirection()*this->speed_);
     71                //Ogre::Vector3 vec = this->getMuzzlePosition();
     72                //vec.normalise();
     73                //rocket->setAcceleration(100*vec);
    7174                rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    7275                //con->getRocket()->setPosition(this->getMuzzlePosition());
    73         //con->setControllableEntity(dynamic_cast<ControllableEntity*>(rocket));
     76        //con->setControllableEntity(dynamic_cast<rocket*>(ControllableEntity));
    7477        //con->getControllableEntity()->setPosition(this->getMuzzlePosition());
    7578
Note: See TracChangeset for help on using the changeset viewer.