Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

now rocket slows and then finally stops after a given number of ticks (aka fuel).
rocket speeds up if distance is greater than x (right now 1000 but can be changed).
collisionShape not yet fixed.

Location:
code/branches/rocket2/src/modules/weapons/weaponmodes
Files:
2 edited

Legend:

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

    r6956 r6966  
    4646        RegisterObject(SimpleRocketFire);
    4747
    48         this->reloadTime_ = 0.20f;
     48        this->reloadTime_ = 4;
    4949        this->bParallelReload_ = false;
    5050        this->damage_ = 100;
     
    6464        SimpleRocket* rocket = con->getRocket();
    6565        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    66 //      rocket->setOrientation(this->getMuzzleOrientation());
    6766        rocket->setOrientation(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getWorldOrientation());
    68         Vector3 pos = this->getMuzzlePosition();
    69         rocket->setPosition(pos);
    70 //      rocket->setAcceleration(20*rocket->getOrientation() * WorldEntity::FRONT);
     67        rocket->setPosition(this->getMuzzlePosition());
    7168        rocket->setVelocity(this->getMuzzleDirection()*this->speed_);
    7269        rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    7370        rocket->setDamage(this->damage_);
    7471        WorldEntity* pawnn=static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget();
    75         if (pawnn)
    76         {
    77             con->setTarget(pawnn);
    78         }
     72        if (pawnn) con->setTarget(pawnn);
    7973    }
    8074}
  • code/branches/rocket2/src/modules/weapons/weaponmodes/SimpleRocketFire.h

    r6951 r6966  
    4040            SimpleRocketFire(BaseObject* creator);
    4141            virtual ~SimpleRocketFire();
    42 
     42            void deactivateFire();
    4343            virtual void fire();
    4444
    4545        private:
    4646            float speed_;
     47
    4748    };
    4849}
Note: See TracChangeset for help on using the changeset viewer.