Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2016, 4:02:00 PM (9 years ago)
Author:
sagerj
Message:

today I got pawn'ed

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

Legend:

Unmodified
Added
Removed
  • code/branches/sagerjFS16/src/modules/weapons/WeaponsPrereqs.h

    r11052 r11166  
    107107    class SimpleRocketFire;
    108108    class GravityBombFire;
     109    class Discharger;
    109110}
    110111
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/CMakeLists.txt

    r11108 r11166  
    1313  GravityBombFire.cc
    1414  MineGun.cc
     15  Discharger.cc
    1516)
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.cc

    r11153 r11166  
    5151        RegisterObject(Discharger);
    5252
    53         this->reloadTime_ = 0.1f;
    54         this->damage_ = 9000.1f*loaded_;
    55         this->speed_ = 9000.1f*loaded_;
    56 
    57         this->setMunitionName("dEnergy");
    58         this->setFireSound("sounds/Weapon_Discharger.ogg");
    59         this->setReloadSound("sounds/Reload_Discharger.ogg", 0.8);
     53        this->setMunitionName("LaserMunition");
    6054
    6155        hudImageString_ = "Orxonox/WSHUD_WM_LaserFire";
    6256    }
    6357
    64     /**
    65     @brief
    66         Fires the weapon. Creates a projectile and fires it.
    67     */
    6858    void Discharger::fire()
    6959    {
    70         /*BillboardProjectile* projectile = new BillboardProjectile(this->getContext());
    71 
    72         this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    73         projectile->setOrientation(this->getMuzzleOrientation());
    74         projectile->setPosition(this->getMuzzlePosition());
    75         projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
    76 
    77         projectile->setShooter(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    78         projectile->setDamage(this->getDamage());
    79         projectile->setShieldDamage(this->getShieldDamage());
    80         projectile->setHealthDamage(this->getHealthDamage());*/
    81         extern unsigned int beginLoad_ = time;
     60        orxout() << "fire dis " << endl;
    8261    }
    83     void Discharger::release()
     62   
     63    bool Discharger::fire(float* reloadTime)
    8464    {
    85         extern unsigned int endLoad_ = time;
    86         extern unsigned int loaded_ = endLoad_ - beginLoad_;
    87 
     65        orxout() << "fire Discharger " << endl;
     66        return false;
     67    }
     68    bool Discharger::release(float* reloadTime)
     69    {
     70        orxout() << "release Discharger " << endl;
     71        return false;
    8872    }
    8973}
  • code/branches/sagerjFS16/src/modules/weapons/weaponmodes/Discharger.h

    r11153 r11166  
    5555
    5656            virtual void fire() override;
    57             virtual void release() override;
     57            virtual bool fire(float* reloadTime) override;
     58            virtual bool release(float* reloadTime) override;
    5859
    5960        private:
    60             float speed_; //!< The speed of the fired projectile.
    61             float loaded_; // The time how long the weapon charged
    62             float beginLoad_;
    63             float endLoad_;
    6461    };
    6562}
Note: See TracChangeset for help on using the changeset viewer.