Changeset 9629 for code/branches/core6/src/modules/weapons/weaponmodes
- Timestamp:
- Aug 9, 2013, 9:26:46 PM (11 years ago)
- Location:
- code/branches/core6/src/modules/weapons/weaponmodes
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/src/modules/weapons/weaponmodes/EnergyDrink.cc
r8855 r9629 51 51 CreateFactory(EnergyDrink); 52 52 53 EnergyDrink::EnergyDrink( BaseObject* creator) : WeaponMode(creator)53 EnergyDrink::EnergyDrink(Context* context) : WeaponMode(context) 54 54 { 55 55 RegisterObject(EnergyDrink); … … 101 101 { 102 102 // Create the projectile 103 Projectile* projectile = new Projectile(this );104 Model* model = new Model(projectile );103 Projectile* projectile = new Projectile(this->getContext()); 104 Model* model = new Model(projectile->getContext()); 105 105 model->setMeshSource("can.mesh"); 106 106 model->setCastShadows(false); … … 127 127 void EnergyDrink::muzzleflash() 128 128 { 129 MuzzleFlash *muzzleFlash = new MuzzleFlash(this );129 MuzzleFlash *muzzleFlash = new MuzzleFlash(this->getContext()); 130 130 this->getWeapon()->attach(muzzleFlash); 131 131 muzzleFlash->setPosition(this->getMuzzleOffset()); -
code/branches/core6/src/modules/weapons/weaponmodes/EnergyDrink.h
r8855 r9629 54 54 { 55 55 public: 56 EnergyDrink( BaseObject* creator);56 EnergyDrink(Context* context); 57 57 virtual ~EnergyDrink() {} 58 58 -
code/branches/core6/src/modules/weapons/weaponmodes/FusionFire.cc
r8855 r9629 48 48 CreateFactory(FusionFire); 49 49 50 FusionFire::FusionFire( BaseObject* creator) : WeaponMode(creator)50 FusionFire::FusionFire(Context* context) : WeaponMode(context) 51 51 { 52 52 RegisterObject(FusionFire); … … 66 66 void FusionFire::fire() 67 67 { 68 BillboardProjectile* projectile = new BillboardProjectile(this );68 BillboardProjectile* projectile = new BillboardProjectile(this->getContext()); 69 69 70 70 projectile->setOrientation(this->getMuzzleOrientation()); -
code/branches/core6/src/modules/weapons/weaponmodes/FusionFire.h
r8855 r9629 51 51 { 52 52 public: 53 FusionFire( BaseObject* creator);53 FusionFire(Context* context); 54 54 virtual ~FusionFire() {} 55 55 -
code/branches/core6/src/modules/weapons/weaponmodes/HsW01.cc
r9526 r9629 52 52 CreateFactory(HsW01); 53 53 54 HsW01::HsW01( BaseObject* creator) : WeaponMode(creator)54 HsW01::HsW01(Context* context) : WeaponMode(context) 55 55 { 56 56 RegisterObject(HsW01); … … 111 111 112 112 // Create the projectile. 113 Projectile* projectile = new Projectile(this );114 Model* model = new Model(projectile );113 Projectile* projectile = new Projectile(this->getContext()); 114 Model* model = new Model(projectile->getContext()); 115 115 model->setMeshSource(mesh_); 116 116 model->setCastShadows(false); … … 138 138 void HsW01::muzzleflash() 139 139 { 140 MuzzleFlash *muzzleFlash = new MuzzleFlash(this );140 MuzzleFlash *muzzleFlash = new MuzzleFlash(this->getContext()); 141 141 this->getWeapon()->attach(muzzleFlash); 142 142 muzzleFlash->setPosition(this->getMuzzleOffset()); -
code/branches/core6/src/modules/weapons/weaponmodes/HsW01.h
r9526 r9629 53 53 { 54 54 public: 55 HsW01( BaseObject* creator);55 HsW01(Context* context); 56 56 virtual ~HsW01(); 57 57 -
code/branches/core6/src/modules/weapons/weaponmodes/LaserFire.cc
r8855 r9629 47 47 CreateFactory(LaserFire); 48 48 49 LaserFire::LaserFire( BaseObject* creator) : WeaponMode(creator)49 LaserFire::LaserFire(Context* context) : WeaponMode(context) 50 50 { 51 51 RegisterObject(LaserFire); … … 64 64 void LaserFire::fire() 65 65 { 66 ParticleProjectile* projectile = new ParticleProjectile(this );66 ParticleProjectile* projectile = new ParticleProjectile(this->getContext()); 67 67 68 68 projectile->setOrientation(this->getMuzzleOrientation()); -
code/branches/core6/src/modules/weapons/weaponmodes/LaserFire.h
r8855 r9629 51 51 { 52 52 public: 53 LaserFire( BaseObject* creator);53 LaserFire(Context* context); 54 54 virtual ~LaserFire() {} 55 55 -
code/branches/core6/src/modules/weapons/weaponmodes/LightningGun.cc
r9016 r9629 46 46 CreateFactory(LightningGun); 47 47 48 LightningGun::LightningGun( BaseObject* creator) : WeaponMode(creator)48 LightningGun::LightningGun(Context* context) : WeaponMode(context) 49 49 { 50 50 RegisterObject(LightningGun); … … 68 68 void LightningGun::fire() 69 69 { 70 LightningGunProjectile* projectile = new LightningGunProjectile(this );70 LightningGunProjectile* projectile = new LightningGunProjectile(this->getContext()); 71 71 projectile->setMaterial("Flares/LightningBall_"); 72 72 -
code/branches/core6/src/modules/weapons/weaponmodes/LightningGun.h
r8855 r9629 51 51 { 52 52 public: 53 LightningGun( BaseObject* creator);53 LightningGun(Context* context); 54 54 virtual ~LightningGun(); 55 55 -
code/branches/core6/src/modules/weapons/weaponmodes/RocketFire.cc
r8855 r9629 48 48 CreateFactory(RocketFire); 49 49 50 RocketFire::RocketFire( BaseObject* creator) : WeaponMode(creator)50 RocketFire::RocketFire(Context* context) : WeaponMode(context) 51 51 { 52 52 RegisterObject(RocketFire); … … 71 71 void RocketFire::fire() 72 72 { 73 Rocket* rocket = new Rocket(this );73 Rocket* rocket = new Rocket(this->getContext()); 74 74 75 75 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); -
code/branches/core6/src/modules/weapons/weaponmodes/RocketFire.h
r8855 r9629 51 51 { 52 52 public: 53 RocketFire( BaseObject* creator);53 RocketFire(Context* context); 54 54 virtual ~RocketFire(); 55 55 -
code/branches/core6/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r8855 r9629 52 52 CreateFactory(SimpleRocketFire); 53 53 54 SimpleRocketFire::SimpleRocketFire( BaseObject* creator) : WeaponMode(creator)54 SimpleRocketFire::SimpleRocketFire(Context* context) : WeaponMode(context) 55 55 { 56 56 RegisterObject(SimpleRocketFire); … … 76 76 void SimpleRocketFire::fire() 77 77 { 78 RocketController* controller = new RocketController(this );78 RocketController* controller = new RocketController(this->getContext()); 79 79 SimpleRocket* rocket = controller->getRocket(); 80 80 this->computeMuzzleParameters(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()->getAimPosition()); -
code/branches/core6/src/modules/weapons/weaponmodes/SimpleRocketFire.h
r8855 r9629 50 50 { 51 51 public: 52 SimpleRocketFire( BaseObject* creator);52 SimpleRocketFire(Context* context); 53 53 virtual ~SimpleRocketFire(); 54 54 void deactivateFire();
Note: See TracChangeset
for help on using the changeset viewer.