Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 28, 2016, 3:09:26 PM (9 years ago)
Author:
sagerj
Message:

overwritten many fire functions now only need to implement timer/charges

Location:
code/branches/sagerjFS16/src/modules/weapons
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sagerjFS16/src/modules/weapons/projectiles/Rocket.cc

    r11071 r11175  
    218218        Destroys the Rocket upon pressing "fire".
    219219    */
    220     void Rocket::fired(unsigned int firemode)
     220    void Rocket::pushed(unsigned int firemode)
    221221    {
    222222        this->destroyObject();
  • code/branches/sagerjFS16/src/modules/weapons/projectiles/Rocket.h

    r11071 r11175  
    116116            virtual void setShooter(Pawn* shooter) override;
    117117
    118             virtual void fired(unsigned int firemode) override;
     118            virtual void pushed(unsigned int firemode) override;
    119119
    120120            /**
  • code/branches/sagerjFS16/src/modules/weapons/projectiles/RocketOld.cc

    r11071 r11175  
    218218        Destroys the RocketOld upon pressing "fire".
    219219    */
    220     void RocketOld::fired(unsigned int firemode)
     220    void RocketOld::pushed(unsigned int firemode)
    221221    {
    222222        this->destroyObject();
  • code/branches/sagerjFS16/src/modules/weapons/projectiles/RocketOld.h

    r11071 r11175  
    116116            virtual void setShooter(Pawn* shooter) override;
    117117
    118             virtual void fired(unsigned int firemode) override;
     118            virtual void pushed(unsigned int firemode) override;
    119119
    120120        private:
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc

    r11174 r11175  
    5454        this->damage_ = 90.01f;
    5555        this->speed_ = 90.01f;
    56         this->chargeable_ = 0;
     56        this->chargeable_ = true;
    5757
    5858        this->setMunitionName("LaserMunition");
     
    6565    void Discharger::fire()
    6666    {
    67         orxout() << "release" << cTime_ << endl;
     67        // orxout() << "release" << cTime_ << endl;
    6868        BillboardProjectile* projectile = new BillboardProjectile(this->getContext());
    6969
     
    7171        projectile->setOrientation(this->getMuzzleOrientation());
    7272        projectile->setPosition(this->getMuzzlePosition());
    73         projectile->setVelocity(this->getMuzzleDirection() * this->speed_ * charges_);
     73        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
    7474
    7575        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    7676        projectile->setDamage(this->getDamage() * charges_);
    77         projectile->setShieldDamage(this->getShieldDamage() * charges_);
    78         projectile->setHealthDamage(this->getHealthDamage() * charges_);
    79         this->charges_ = 0;
     77        projectile->setShieldDamage(this->getShieldDamage());
     78        projectile->setHealthDamage(this->getHealthDamage());
     79        //  this->charges_ = 0;
    8080    }
    8181}
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h

    r11174 r11175  
    5858
    5959        private:
    60             bool chargeable_;       // An indicator that this weapon type is chargeable.
    61             float speed_;           // The speed of the fired projectile.
    62             float ctime_;           // time the weapon has charged.
    63     };
     60            //bool chargeable_;     // An indicator that this weapon type is chargeable.
     61            int charges_;
     62            float speed_;                  // The speed of the fired projectile.
     63            float ctime_;                  // time the weapon has charged.
     64    };
    6465}
    6566
Note: See TracChangeset for help on using the changeset viewer.