- Timestamp:
- May 16, 2011, 5:25:00 PM (14 years ago)
- Location:
- code/branches/gameimmersion/src/modules/weapons/projectiles
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/src/modules/weapons/projectiles/CMakeLists.txt
r7163 r8492 6 6 Rocket.cc 7 7 SimpleRocket.cc 8 BasicProjectile.cc 8 9 ) -
code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.cc
r8386 r8492 36 36 #include "worldentities/pawns/Pawn.h" 37 37 #include "graphics/ParticleSpawner.h" 38 #include "BasicProjectile.h" 38 39 39 40 namespace orxonox … … 41 42 CreateFactory(Projectile); 42 43 43 Projectile::Projectile(BaseObject* creator) : MovableEntity(creator) 44 Projectile::Projectile(BaseObject* creator) : MovableEntity(creator), BasicProjectile() 44 45 { 45 46 RegisterObject(Projectile); 46 47 47 48 this->setConfigValues(); 48 this->bDestroy_ = false;49 // this->bDestroy_ = false; 49 50 this->owner_ = 0; 50 this->damage_ = 115;51 // this->damage_ = 115; 51 52 ///////////////////me 52 this->healthdamage_ = 0;53 this->shielddamage_ = 0;53 // this->healthdamage_ = 0; 54 // this->shielddamage_ = 0; 54 55 ///////////////////end me 55 56 … … 88 89 return; 89 90 90 if (this-> bDestroy_)91 if (this->getBDestroy()) 91 92 this->destroy(); // TODO: use a scheduler instead of deleting the object right here in tick() 92 93 } … … 98 99 } 99 100 101 bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 102 { 103 return BasicProjectile::basicCollidesAgainst(otherObject,contactPoint,this->owner_,this); 104 } 105 100 106 //////////////////////////me edit 101 bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)107 /* bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 102 108 { 103 109 if (!this->bDestroy_ && GameMode::isMaster()) … … 150 156 } 151 157 //////////////////////////////////////////////////////////////////////end edit 152 158 */ 153 159 void Projectile::setOwner(Pawn* owner) 154 160 { 155 161 this->owner_ = owner; 156 162 } 163 157 164 } -
code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.h
r8386 r8492 35 35 #include "worldentities/MovableEntity.h" 36 36 37 #include "BasicProjectile.h" 38 37 39 namespace orxonox 38 40 { 39 class _WeaponsExport Projectile : public MovableEntity 41 class _WeaponsExport Projectile : public MovableEntity, public BasicProjectile 40 42 { 41 43 public: … … 49 51 virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); 50 52 51 inline void setDamage(float damage)53 /* inline void setDamage(float damage) 52 54 { this->damage_ = damage; COUT(3) << "DAMAGE-SET-FUNKTION WIRD AUFGERUFEN" << endl; } 53 55 inline float getDamage() const 54 56 { return this->damage_; } 55 57 */ 56 58 void setOwner(Pawn* owner); 57 59 inline Pawn* getOwner() const 58 60 { return this->owner_; } 59 61 60 / ///////////////////me62 /*///////////////////me 61 63 62 64 inline void setHealthDamage(float healthdamage) … … 71 73 72 74 ///////////////////end me 73 75 */ 74 76 75 77 private: 76 78 WeakPtr<Pawn> owner_; 77 79 float lifetime_; 78 float damage_;80 /* float damage_; 79 81 ///////me 80 82 float healthdamage_; … … 82 84 ///////end me 83 85 bool bDestroy_; 84 Timer destroyTimer_;86 */ Timer destroyTimer_; 85 87 }; 86 88 }
Note: See TracChangeset
for help on using the changeset viewer.