Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 19, 2008, 7:07:36 PM (16 years ago)
Author:
polakma
Message:

added new features to munition.h and weapon.h. tried to fix projectiles (still doesn't compile)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weapon2/src/orxonox/objects/weaponSystem/weapons/LaserGun.cc

    r2203 r2232  
    4444
    4545        //set weapon properties here
    46         this->setLoadingTime(0.5);
     46        //this->setLoadingTime(0.5);
    4747
    4848        //Hack --> will be loaded by XML
     
    5656    void LaserGun::fire()
    5757    {
    58         if ( this->getWeaponReadyToShoot() )
     58        if ( this->getBulletReadyToShoot() && this->getMagazineReadyToShoot() )
    5959        {
    60             this->setWeaponReadyToShoot(false);
    6160
    62             Weapon::timer();
     61
    6362
    6463            //take munition
    65             this->getAttachedMunition()->decrementBullets();
     64            this->getAttachedMunition()->removeBullets(1,this);
     65            Weapon::bulletTimer();
     66            this->setBulletReadyToShoot(false);
    6667
    6768            //create projectile
    68             //BillboardProjectile* projectile = new ParticleProjectile(this);
     69            BillboardProjectile* projectile = new ParticleProjectile(this,this);
    6970            //projectile->setColour(this->getProjectileColour());
    7071        }
Note: See TracChangeset for help on using the changeset viewer.