Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 12, 2016, 4:03:47 PM (8 years ago)
Author:
sagerj
Message:

fix the charging during reloadtime, the hudchargebar working so far…

File:
1 edited

Legend:

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

    r11175 r11185  
    2121 *
    2222 *   Author:
    23  *      Martin Polak
     23 *      God of everything
    2424 *   Co-authors:
    25  *      simonmie
     25 *   
    2626 *
    2727 */
     
    5151        RegisterObject(Discharger);
    5252
    53         this->reloadTime_ = 0.23f;
    54         this->damage_ = 90.01f;
    55         this->speed_ = 90.01f;
     53        this->reloadTime_ = 3.14159f;
     54        this->damage_ = 0.0f;
     55        this->speed_ = 100.0f;
    5656        this->chargeable_ = true;
    5757
     
    6565    void Discharger::fire()
    6666    {
    67         // orxout() << "release" << cTime_ << endl;
    6867        BillboardProjectile* projectile = new BillboardProjectile(this->getContext());
    6968
     
    7170        projectile->setOrientation(this->getMuzzleOrientation());
    7271        projectile->setPosition(this->getMuzzlePosition());
    73         projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
     72        projectile->setVelocity(this->getMuzzleDirection() * this->speed_ * this->charges_ / 5);
    7473
    7574        projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    76         projectile->setDamage(this->getDamage() * charges_);
    77         projectile->setShieldDamage(this->getShieldDamage());
    78         projectile->setHealthDamage(this->getHealthDamage());
    79         //  this->charges_ = 0;
     75        projectile->setDamage(this->getDamage() * this->charges_);
     76        projectile->setShieldDamage(this->getShieldDamage() * this->charges_);
     77        projectile->setHealthDamage(this->getHealthDamage() * this->charges_);
     78        this->charges_ = 0;
    8079    }
    8180}
Note: See TracChangeset for help on using the changeset viewer.