Changeset 10765 for code/branches/cpp11_v2/src/modules/weapons
- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/modules/weapons
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/weapons/IceGunFreezer.cc
r10629 r10765 101 101 102 102 // Check if the freezer is attached to a parent and check if the parent is a SpaceShip 103 if (parent != NULL&& parent->isA(Class(SpaceShip)))103 if (parent != nullptr && parent->isA(Class(SpaceShip))) 104 104 { 105 105 freezedSpaceShip_ = orxonox_cast<SpaceShip*>(parent); … … 118 118 void IceGunFreezer::stopFreezing() 119 119 { 120 if (freezedSpaceShip_ != NULL&& freezeFactor_ != 0.0)120 if (freezedSpaceShip_ != nullptr && freezeFactor_ != 0.0) 121 121 { 122 122 freezedSpaceShip_->addSpeedFactor(1/freezeFactor_); -
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.