- Timestamp:
- Jan 17, 2016, 10:29:21 PM (8 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/weapons/projectiles/MineProjectile.cc
r11052 r11071 112 112 modelRing4_->yaw(Degree(270)); 113 113 114 emitter_ = NULL;114 emitter_ = nullptr; 115 115 116 116 if (GameMode::isMaster()) … … 121 121 this->enableCollisionCallback(); 122 122 this->setCollisionResponse(true); 123 this->setCollisionType( Dynamic);123 this->setCollisionType(CollisionType::Dynamic); 124 124 125 125 // Create a sphere collision shape and attach it to the projectile. … … 217 217 { 218 218 // Damage all pawns within the damage radius 219 for ( ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)219 for (Pawn* pawn : ObjectList<Pawn>()) 220 220 { 221 Vector3 distanceVector = it->getWorldPosition()-this->getWorldPosition();221 Vector3 distanceVector = pawn->getWorldPosition()-this->getWorldPosition(); 222 222 if(distanceVector.length()< damageRadius_) 223 223 { 224 it->hit(this->getShooter(), it->getWorldPosition(), NULL, this->getDamage(), this->getHealthDamage(), this->getShieldDamage());224 pawn->hit(this->getShooter(), pawn->getWorldPosition(), nullptr, this->getDamage(), this->getHealthDamage(), this->getShieldDamage()); 225 225 } 226 226 }
Note: See TracChangeset
for help on using the changeset viewer.