Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Location:
code/branches/particles2/src/modules/weapons/weaponmodes
Files:
1 edited
2 copied

Legend:

Unmodified
Added
Removed
  • code/branches/particles2/src/modules/weapons/weaponmodes/CMakeLists.txt

    r5781 r6065  
    55  HsW01.cc
    66  LightningGun.cc
     7  RocketFire.cc
    78)
  • 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}
  • code/branches/particles2/src/modules/weapons/weaponmodes/RocketFire.h

    r6059 r6065  
    2727 */
    2828
    29 #ifndef _FusionFire_H__
    30 #define _FusionFire_H__
     29#ifndef _RocketFire_H__
     30#define _RocketFire_H__
    3131
    3232#include "weapons/WeaponsPrereqs.h"
     
    3535namespace orxonox
    3636{
    37     class _WeaponsExport FusionFire : public WeaponMode
     37    class _WeaponsExport RocketFire : public WeaponMode
    3838    {
    3939        public:
    40             FusionFire(BaseObject* creator);
    41             virtual ~FusionFire() {}
     40            RocketFire(BaseObject* creator);
     41            virtual ~RocketFire() {}
    4242
    4343            virtual void fire();
     
    4848}
    4949
    50 #endif /* _FusionFire_H__ */
     50#endif /* _RocketFire_H__ */
Note: See TracChangeset for help on using the changeset viewer.