Changeset 10765 for code/branches/cpp11_v2/src/modules/weapons/projectiles
- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/modules/weapons/projectiles
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/weapons/projectiles/BasicProjectile.cc
r10293 r10765 88 88 // The projectile is destroyed by its tick()-function (in the following tick). 89 89 90 Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is NULL90 Pawn* victim = orxonox_cast<Pawn*>(otherObject); // If otherObject isn't a Pawn, then victim is nullptr 91 91 92 92 WorldEntity* entity = orxonox_cast<WorldEntity*>(this); … … 146 146 bool BasicProjectile::isObjectRelatedToShooter(WorldEntity* otherObject) 147 147 { 148 for (WorldEntity* shooter = this->getShooter(); shooter != NULL; shooter = shooter->getParent())148 for (WorldEntity* shooter = this->getShooter(); shooter != nullptr; shooter = shooter->getParent()) 149 149 if (otherObject == shooter) 150 150 return true; 151 for (WorldEntity* object = otherObject; object != NULL; object = object->getParent())151 for (WorldEntity* object = otherObject; object != nullptr; object = object->getParent()) 152 152 if (otherObject == this->getShooter()) 153 153 return true; -
code/branches/cpp11_v2/src/modules/weapons/projectiles/GravityBombField.cc
r10622 r10765 137 137 float damage = FORCE_FIELD_EXPLOSION_DAMMAGE*(1-distanceVector.length()/EXPLOSION_RADIUS); 138 138 //orxout(debug_output) << "Damage: " << damage << endl; 139 it->hit(shooter_, it->getWorldPosition(), NULL, damage, 0,0);139 it->hit(shooter_, it->getWorldPosition(), nullptr, damage, 0,0); 140 140 victimsAlreadyDamaged_.push_back(*it); 141 141 } -
code/branches/cpp11_v2/src/modules/weapons/projectiles/Projectile.cc
r10629 r10765 94 94 void Projectile::setCollisionShapeRadius(float radius) 95 95 { 96 if (collisionShape_ != NULL&& radius > 0)96 if (collisionShape_ != nullptr && radius > 0) 97 97 { 98 98 collisionShape_->setRadius(radius);
Note: See TracChangeset
for help on using the changeset viewer.