Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 24, 2016, 3:56:35 PM (9 years ago)
Author:
sagerj
Message:

added release functions in various classes: weaponmode, weaponsystem, humancontroller, newhumancontroller, discharger

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

Legend:

Unmodified
Added
Removed
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc

    r11142 r11153  
    5252
    5353        this->reloadTime_ = 0.1f;
    54         this->damage_ = 9000.1f;
    55         this->speed_ = 9000.1f;
     54        this->damage_ = 9000.1f*loaded_;
     55        this->speed_ = 9000.1f*loaded_;
    5656
    5757        this->setMunitionName("dEnergy");
     
    6868    void Discharger::fire()
    6969    {
    70 
    71     }
    72     void Discharger::unfire()
    73     {
    74         BillboardProjectile* projectile = new BillboardProjectile(this->getContext());
     70        /*BillboardProjectile* projectile = new BillboardProjectile(this->getContext());
    7571
    7672        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
     
    8278        projectile->setDamage(this->getDamage());
    8379        projectile->setShieldDamage(this->getShieldDamage());
    84         projectile->setHealthDamage(this->getHealthDamage());
     80        projectile->setHealthDamage(this->getHealthDamage());*/
     81        extern unsigned int beginLoad_ = time;
     82    }
     83    void Discharger::release()
     84    {
     85        extern unsigned int endLoad_ = time;
     86        extern unsigned int loaded_ = endLoad_ - beginLoad_;
     87
    8588    }
    8689}
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h

    r11142 r11153  
    5555
    5656            virtual void fire() override;
    57             virtual void unfire() override;
     57            virtual void release() override;
    5858
    5959        private:
    6060            float speed_; //!< The speed of the fired projectile.
     61            float loaded_; // The time how long the weapon charged
     62            float beginLoad_;
     63            float endLoad_;
    6164    };
    6265}
Note: See TracChangeset for help on using the changeset viewer.