- Timestamp:
- Apr 4, 2011, 2:14:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gameimmersion/src/modules/weapons/projectiles/Projectile.cc
r8152 r8183 94 94 } 95 95 96 //////////////////////////me edit 96 97 bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 97 98 { … … 103 104 this->bDestroy_ = true; 104 105 105 Pawn* victim = orxonox_cast<Pawn*>(otherObject); 106 Pawn* victim = orxonox_cast<Pawn*>(otherObject); //if otherObject isn't a Pawn, then victim is NULL 106 107 107 108 if (this->owner_) 108 109 { 109 if ( victim && !victim->hasShield())110 if (!victim || (victim && !victim->hasShield())) //same like below 110 111 { 111 112 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator()); … … 116 117 effect->setLifetime(2.0f); 117 118 } 118 if ( victim && !victim->hasShield())119 if (!victim || (victim && !victim->hasShield())) //same like above 119 120 { 120 121 ParticleSpawner* effect = new ParticleSpawner(this->owner_->getCreator()); … … 137 138 138 139 if (victim) 140 { 139 141 victim->hit(this->owner_, contactPoint, this->damage_); 142 victim->startReloadCountdown(); 143 } 140 144 } 141 145 return false; 142 146 } 147 //////////////////////////////////////////////////////////////////////end edit 143 148 144 149 void Projectile::setOwner(Pawn* owner)
Note: See TracChangeset
for help on using the changeset viewer.