Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6813


Ignore:
Timestamp:
May 1, 2010, 12:37:53 PM (15 years ago)
Author:
gnadler
Message:

RocketController now creates rocket. compiles.
but rocket doesn't spawn.

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

Legend:

Unmodified
Added
Removed
  • code/branches/rocket/src/modules/weapons/RocketController.cc

    r6811 r6813  
    4343
    4444        RegisterObject(RocketController);
     45                SimpleRocket* rocket = new SimpleRocket(this);
     46                rocket->setController(this);
     47                this->setControllableEntity(dynamic_cast<ControllableEntity*> (rocket));
    4548
    4649    }
     
    6972        */
    7073
    71         //void setRocket(SimpleRocket* rocket, RocketController* contr) {
    72         //              contr->setControllableEntity(dynamic_cast<ControllableEntity*> rocket);
    73         //}
    7474}
  • code/branches/rocket/src/modules/weapons/RocketController.h

    r6811 r6813  
    4949            RocketController(BaseObject* creator);
    5050                        virtual ~RocketController(){};
    51                         void setRocket(SimpleRocket* rocket, RocketController* contr);
    5251           
    5352            virtual void tick(float dt);
  • code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc

    r6810 r6813  
    5959        this->lifetime_ = 100;
    6060                //this->camera_ = null;
    61                 RocketController* myRController = new RocketController(this);
    62                 this->setController(myRController);
     61                //RocketController* myRController = new RocketController(this);
     62                //this->setController(creator);
    6363                //myRController->setRocket(this, myRController);
    6464               
     
    6868        //this->controllableEntity_->setController(this->controller_);
    6969
    70         if (GameMode::isMaster())
    71         {
     70        //if (GameMode::isMaster())
     71        //{
    7272         /*   this->setCollisionType(WorldEntity::Kinematic);
    7373            this->setVelocity(0,0,-100);*/
     
    9292
    9393            this->destroyTimer_.setTimer(this->lifetime_, false, createExecutor(createFunctor(&SimpleRocket::destroyObject, this)));
    94         }
     94       // }
    9595
    9696    }
  • code/branches/rocket/src/modules/weapons/weaponmodes/SimpleRocketFire.cc

    r6810 r6813  
    3131#include "util/Math.h"
    3232#include "core/CoreIncludes.h"
    33 #include "weapons/projectiles/SimpleRocket.h"
     33#include "weapons/RocketController.h"
    3434
    3535#include "weaponsystem/Weapon.h"
     
    6161    void SimpleRocketFire::fire()
    6262    {
    63         SimpleRocket* rocket = new SimpleRocket(this);
     63        //SimpleRocket* rocket = new SimpleRocket(this);
     64                RocketController* con = new RocketController(this);
     65
    6466
    6567      /*  this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition());
Note: See TracChangeset for help on using the changeset viewer.