Changeset 8538 for code/branches/gameimmersion
- Timestamp:
- May 23, 2011, 3:09:07 PM (13 years ago)
- Location:
- code/branches/gameimmersion
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/data/levels/includes/weaponSettingsImmTest.oxi
r8492 r8538 18 18 <DefaultWeaponmodeLink firemode=3 weaponmode=3 /> 19 19 </links> 20 <!-- HsW01 is the standard Weapon, 4 slots => 4 Projectiles spawned at one click --> 21 <!-- LightningGun is the spiral weapon, 2 slots --> 22 <!-- SimpleRocket is the target-following rocket --> 23 <!-- Rocket is the player-guided rocket --> 20 24 <Weapon> 21 25 <attached> -
code/branches/gameimmersion/src/modules/weapons/projectiles/BasicProjectile.cc
r8492 r8538 49 49 50 50 this->bDestroy_ = false; 51 // this->owner_ = 0;52 51 53 52 this->damage_ = 0; … … 127 126 } 128 127 129 /* void BasicProjectile::setOwner(Pawn* owner) 130 { 131 this->owner_ = owner; 132 } 133 134 void BasicProjectile::destroyObject() 128 /* void BasicProjectile::destroyObject() 135 129 { 136 130 if (GameMode::isMaster()) -
code/branches/gameimmersion/src/modules/weapons/projectiles/BasicProjectile.h
r8492 r8538 48 48 void basicDestroyObject(); 49 49 50 /* void basicSetOwner(Pawn* owner);51 inline Pawn* basicGetOwner() const52 { return this->owner_; }53 */54 55 50 inline void setDamage(float damage) 56 51 { this->damage_ = damage; } … … 75 70 76 71 77 78 72 private: 79 // WeakPtr<Pawn> owner_; 73 // WeakPtr<Pawn> owner_; //owner cannot be set in BasicProjectile, because it's already defined in MobileEntity and Movable Entity 80 74 81 75 float damage_; -
code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.cc
r8533 r8538 47 47 this->setConfigValues(); 48 48 // this->bDestroy_ = false; 49 this->owner_ = 0;49 // this->owner_ = 0; 50 50 // this->damage_ = 115; 51 51 ///////////////////me … … 100 100 bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 101 101 { 102 return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this-> owner_,this);102 return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->getOwner(),this); 103 103 } 104 104 … … 160 160 this->owner_ = owner; 161 161 } 162 163 162 } -
code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.h
r8492 r8538 56 56 { return this->damage_; } 57 57 */ 58 59 58 60 void setOwner(Pawn* owner); 59 61 inline Pawn* getOwner() const -
code/branches/gameimmersion/src/modules/weapons/projectiles/Rocket.cc
r8533 r8538 148 148 { 149 149 this->owner_ = owner; 150 this->player_ = this-> owner_->getPlayer();151 this-> owner_->getPlayer()->startTemporaryControl(this);150 this->player_ = this->getOwner()->getPlayer(); 151 this->getOwner()->getPlayer()->startTemporaryControl(this); 152 152 153 153 if( GameMode::isMaster() ) … … 185 185 bool Rocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 186 186 { 187 return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this-> owner_,this);187 return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->getOwner(),this); 188 188 189 189 /* * / if (!this->bDestroy_ && GameMode::isMaster()) … … 246 246 { 247 247 ParticleSpawner *effect1, *effect2; 248 if( this-> owner_)249 { 250 effect1 = new ParticleSpawner(this-> owner_->getCreator());251 effect2 = new ParticleSpawner(this-> owner_->getCreator());248 if( this->getOwner() ) 249 { 250 effect1 = new ParticleSpawner(this->getOwner()->getCreator()); 251 effect2 = new ParticleSpawner(this->getOwner()->getCreator()); 252 252 } 253 253 else -
code/branches/gameimmersion/src/modules/weapons/projectiles/Rocket.h
r8533 r8538 111 111 { return this->owner_; } 112 112 113 /* inline void setDamage(float damage)114 { this->damage_ = damage; }115 inline float getDamage() const116 { return this->damage_; }117 */118 119 113 virtual void fired(unsigned int firemode); 120 114 -
code/branches/gameimmersion/src/modules/weapons/projectiles/SimpleRocket.cc
r8533 r8538 159 159 { 160 160 this->owner_ = owner; 161 this->player_ = this-> owner_->getPlayer();161 this->player_ = this->getOwner()->getPlayer(); 162 162 } 163 163 … … 167 167 bool SimpleRocket::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 168 168 { 169 return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this-> owner_,this);169 return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->getOwner(),this); 170 170 /* if (!this->bDestroy_ && GameMode::isMaster()) 171 171 { -
code/branches/gameimmersion/src/modules/weapons/projectiles/SimpleRocket.h
r8533 r8538 113 113 inline Pawn* getOwner() const 114 114 { return this->owner_; } 115 115 116 inline bool hasFuel() const 116 117 { return this->fuel_; } 117 118 118 /* inline void setDamage(float damage)119 { this->damage_ = damage; }120 inline float getDamage() const121 { return this->damage_; }122 */123 119 124 120 private:
Note: See TracChangeset
for help on using the changeset viewer.