Changeset 8152 for code/branches/gameimmersion/src
- Timestamp:
- Mar 28, 2011, 4:43:18 PM (14 years ago)
- Location:
- code/branches/gameimmersion/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.cc
r7284 r8152 103 103 this->bDestroy_ = true; 104 104 105 Pawn* victim = orxonox_cast<Pawn*>(otherObject); 106 105 107 if (this->owner_) 106 108 { 109 if (victim && !victim->hasShield()) 107 110 { 108 111 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator()); … … 113 116 effect->setLifetime(2.0f); 114 117 } 118 if (victim && !victim->hasShield()) 115 119 { 116 120 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator()); … … 121 125 effect->setLifetime(3.0f); 122 126 } 127 if (victim && victim->hasShield()) 128 { 129 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator()); 130 effect->setPosition(this->getPosition()); 131 effect->setOrientation(this->getOrientation()); 132 effect->setDestroyAfterLife(true); 133 effect->setSource("Orxonox/engineglow"); 134 effect->setLifetime(0.5f); 135 } 123 136 } 124 137 125 Pawn* victim = orxonox_cast<Pawn*>(otherObject);126 138 if (victim) 127 139 victim->hit(this->owner_, contactPoint, this->damage_); -
code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.cc
r8145 r8152 145 145 ////////me 146 146 this->addShieldHealth(this->getReloadRate() * dt); 147 // TODO max. shield hinzufuegen 147 148 ////////end me 148 149 if (GameMode::isMaster()) -
code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.h
r8145 r8152 61 61 inline void addShieldHealth(float amount) 62 62 { this->setShieldHealth(this->shieldHealth_ + amount); } 63 64 inline bool hasShield() 65 { return (this->getShieldHealth() > 0); } 63 66 64 67 ///////////////////////////////// end me
Note: See TracChangeset
for help on using the changeset viewer.