Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Location:
code/branches/sagerjFS16/src/modules
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/sagerjFS16/src/modules/overlays/hud/CMakeLists.txt

    r11052 r11185  
    1414  HUDWeapon.cc
    1515  HUDWeaponSystem.cc
     16  HUDChargeBar.cc
    1617  ChatOverlay.cc
    1718  AnnounceMessage.cc
  • 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}
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h

    r11175 r11185  
    2121 *
    2222 *   Author:
    23  *      Martin Polak
     23 *       God of everything
    2424 *   Co-authors:
    25  *      ...
     25 *     
    2626 *
    2727 */
     
    5858
    5959        private:
    60             //bool chargeable_;     // An indicator that this weapon type is chargeable.
    61             int charges_;
    6260            float speed_;                  // The speed of the fired projectile.
    63             float ctime_;                  // time the weapon has charged.
     61           
    6462    };
    6563}
Note: See TracChangeset for help on using the changeset viewer.