- Timestamp:
- May 16, 2011, 5:25:00 PM (14 years ago)
- Location:
- code/branches/gameimmersion
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/data/levels/includes/weaponSettingsImmTest.oxi
r8395 r8492 26 26 <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" /> 27 27 <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" /> 28 <LightningGun mode=1 muzzleoffset="0,0,0" damage=0 shielddamage= 75/>28 <LightningGun mode=1 muzzleoffset="0,0,0" damage=0 shielddamage=5 healthdamage=200 /> 29 29 </Weapon> 30 30 <Weapon> … … 36 36 <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" /> 37 37 <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" /> 38 <LightningGun mode=1 muzzleoffset="0,0,0" damage=0 shielddamage= 75/>38 <LightningGun mode=1 muzzleoffset="0,0,0" damage=0 shielddamage=5 healthdamage=200 /> 39 39 </Weapon> 40 40 <Weapon> -
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 } -
code/branches/gameimmersion/src/modules/weapons/weaponmodes/EnergyDrink.cc
r7284 r8492 112 112 projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 113 113 projectile->setDamage(this->getDamage()); 114 projectile->setShieldDamage(this->getShieldDamage()); 115 projectile->setHealthDamage(this->getHealthDamage()); 114 116 115 117 EnergyDrink::muendungsfeuer(); -
code/branches/gameimmersion/src/modules/weapons/weaponmodes/FusionFire.cc
r6732 r8492 65 65 projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 66 66 projectile->setDamage(this->getDamage()); 67 projectile->setShieldDamage(this->getShieldDamage()); 68 projectile->setHealthDamage(this->getHealthDamage()); 69 67 70 projectile->setColour(ColourValue(1.0f, 0.7f, 0.3f, 1.0f)); 68 71 } -
code/branches/gameimmersion/src/modules/weapons/weaponmodes/HsW01.cc
r7284 r8492 126 126 projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 127 127 projectile->setDamage(this->getDamage()); 128 projectile->setShieldDamage(this->getShieldDamage()); 129 projectile->setHealthDamage(this->getHealthDamage()); 128 130 129 131 HsW01::muendungsfeuer(); -
code/branches/gameimmersion/src/modules/weapons/weaponmodes/LaserFire.cc
r6732 r8492 61 61 projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 62 62 projectile->setDamage(this->getDamage()); 63 projectile->setShieldDamage(this->getShieldDamage()); 64 projectile->setHealthDamage(this->getHealthDamage()); 63 65 } 64 66 } -
code/branches/gameimmersion/src/modules/weapons/weaponmodes/LightningGun.cc
r8386 r8492 70 70 projectile->setDamage(this->getDamage()); 71 71 projectile->setShieldDamage(this->getShieldDamage()); 72 projectile->setHealthDamage(this->getHealthDamage()); 72 73 } 73 74 } -
code/branches/gameimmersion/src/modules/weapons/weaponmodes/RocketFire.cc
r7846 r8492 71 71 rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 72 72 rocket->setDamage(this->getDamage()); 73 // rocket->setShieldDamage(this->getShieldDamage()); 74 // rocket->setHealthDamage(this->getHealthDamage()); 73 75 } 74 76 } -
code/branches/gameimmersion/src/modules/weapons/weaponmodes/SimpleRocketFire.cc
r7846 r8492 71 71 rocket->setVelocity(this->getMuzzleDirection()*this->speed_); 72 72 rocket->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn()); 73 73 74 rocket->setDamage(this->damage_); 75 // rocket->setShieldDamage(this->getShieldDamage()); 76 // rocket->setHealthDamage(this->getHealthDamage()); 77 74 78 WorldEntity* pawnn=static_cast<ControllableEntity*>(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn())->getTarget(); 75 79 if (pawnn) con->setTarget(pawnn); -
code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.cc
r8386 r8492 201 201 { 202 202 this->reloadRate_ = reloadrate; 203 COUT(2) << "RELOAD RATE SET TO " << this->reloadRate_ << endl;203 //COUT(2) << "RELOAD RATE SET TO " << this->reloadRate_ << endl; 204 204 } 205 205 … … 207 207 { 208 208 this->reloadWaitTime_ = reloadwaittime; 209 COUT(2) << "RELOAD WAIT TIME SET TO " << this->reloadWaitTime_ << endl;209 //COUT(2) << "RELOAD WAIT TIME SET TO " << this->reloadWaitTime_ << endl; 210 210 } 211 211 … … 293 293 // play damage effect 294 294 } 295 COUT(3) << "neue damage-Funktion wurde aufgerufen // " << "Shield:" << this->getShieldHealth() << endl;295 //COUT(3) << "neue damage-Funktion wurde aufgerufen // " << "Shield:" << this->getShieldHealth() << endl; 296 296 } 297 297 … … 346 346 void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage, float shielddamage) 347 347 { 348 COUT(3) << "neue hit2-Funktion wurde aufgerufen // shielddamage: " << shielddamage << std::flush;348 // COUT(3) << "neue hit2-Funktion wurde aufgerufen // shielddamage: " << shielddamage << std::flush; 349 349 if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) ) 350 350 {
Note: See TracChangeset
for help on using the changeset viewer.