Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6814


Ignore:
Timestamp:
May 1, 2010, 6:15:40 PM (15 years ago)
Author:
gnadler
Message:

tried to fix ~RocketController() as well as that the rocket is not visible, but failed

Location:
code/branches/rocket
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/rocket/data/levels/includes/weaponsettings3.oxi

    r6809 r6814  
    3939        </Weapon>
    4040        <Weapon>
    41           <SimpleRocketFire mode=2 muzzleoffset="5,5,5" />
     41          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" />
    4242        </Weapon>
    4343      </WeaponPack>
  • code/branches/rocket/src/modules/weapons/RocketController.cc

    r6813 r6814  
    6767    }
    6868
    69         /*
    70         I wanted to define the controllable entity with this function but the compiler gives the error: line 80: rocket - unidentified identifier
    71         or some similar error.
    72         */
     69
     70        RocketController::~RocketController() {
     71
     72                delete this->getControllableEntity();
     73
     74        }
     75
     76
    7377
    7478}
  • code/branches/rocket/src/modules/weapons/RocketController.h

    r6813 r6814  
    4848        public:
    4949            RocketController(BaseObject* creator);
    50                         virtual ~RocketController(){};
     50                        virtual ~RocketController();
    5151           
    5252            virtual void tick(float dt);
  • code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc

    r6813 r6814  
    6565
    6666
    67       /*  this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
    68         rocket->setOrientation(this->getMuzzleOrientation());
    69         rocket->setPosition(this->getMuzzlePosition());
    70         rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
     67        this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
     68        con->getControllableEntity()->setOrientation(this->getMuzzleOrientation());
     69        con->getControllableEntity()->setPosition(this->getMuzzlePosition());
     70        /* rocket->setVelocity(this->getMuzzleDirection() * this->speed_);
    7171        rocket->scale(2);
    7272
Note: See TracChangeset for help on using the changeset viewer.