Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 15, 2009, 1:15:42 PM (14 years ago)
Author:
scheusso
Message:

cleaned up Rocket mess a bit
there is yet a bug if RocketFire is in weaponslot3

File:
1 copied

Legend:

Unmodified
Added
Removed
  • code/branches/particles2/src/modules/weapons/weaponmodes/RocketFire.cc

    r6059 r6065  
    2727 */
    2828
    29 #include "FusionFire.h"
     29#include "RocketFire.h"
    3030
    3131#include "util/Math.h"
    3232#include "core/CoreIncludes.h"
    33 #include "weapons/projectiles/BillboardProjectile.h"
     33#include "weapons/projectiles/Rocket.h"
    3434
    3535#include "weaponsystem/Weapon.h"
     
    3939namespace orxonox
    4040{
    41     CreateFactory(FusionFire);
     41    CreateFactory(RocketFire);
    4242
    43     FusionFire::FusionFire(BaseObject* creator) : WeaponMode(creator)
     43    RocketFire::RocketFire(BaseObject* creator) : WeaponMode(creator)
    4444    {
    45         RegisterObject(FusionFire);
     45        RegisterObject(RocketFire);
    4646
    47         this->reloadTime_ = 1.0;
     47        this->reloadTime_ = 0.20;
    4848        this->bParallelReload_ = false;
    49         this->damage_ = 40;
    50         this->speed_ = 1250;
     49        this->damage_ = 100;
     50        this->speed_ = 500;
    5151
    52         this->setMunitionName("FusionMunition");
     52        this->setMunitionName("RocketMunition");
    5353    }
    5454
    55     void FusionFire::fire()
     55    void RocketFire::fire()
    5656    {
    57         BillboardProjectile* projectile = new BillboardProjectile(this);
     57        Rocket* rocket = new Rocket(this);
    5858
    59         projectile->setOrientation(this->getMuzzleOrientation());
    60         projectile->setPosition(this->getMuzzlePosition());
    61         projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
    62         projectile->scale(5);
     59        rocket->setOrientation(this->getMuzzleOrientation());
     60        rocket->setPosition(this->getMuzzlePosition());
     61        rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
     62        rocket->scale(2);
    6363
    64         projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
    65         projectile->setDamage(this->getDamage());
    66         projectile->setColour(ColourValue(1.0f, 0.7f, 0.3f, 1.0f));
     64        rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
     65        rocket->setDamage(this->getDamage());
    6766    }
    6867}
Note: See TracChangeset for help on using the changeset viewer.