Changeset 10768 for code/branches/cpp11_v2/src/orxonox/worldentities
- Timestamp:
- Nov 6, 2015, 10:54:34 PM (10 years ago)
- Location:
- code/branches/cpp11_v2/src/orxonox/worldentities
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/worldentities/BigExplosion.cc
r9952 r10768 204 204 void BigExplosion::initZero() 205 205 { 206 this->debrisFire1_ = 0;207 this->debrisFire2_ = 0;208 this->debrisFire3_ = 0;209 this->debrisFire4_ = 0;210 211 this->debrisSmoke1_ = 0;212 this->debrisSmoke2_ = 0;213 this->debrisSmoke3_ = 0;214 this->debrisSmoke4_ = 0;215 216 this->explosionSmoke_= 0;217 this->explosionFire_= 0;206 this->debrisFire1_ = nullptr; 207 this->debrisFire2_ = nullptr; 208 this->debrisFire3_ = nullptr; 209 this->debrisFire4_ = nullptr; 210 211 this->debrisSmoke1_ = nullptr; 212 this->debrisSmoke2_ = nullptr; 213 this->debrisSmoke3_ = nullptr; 214 this->debrisSmoke4_ = nullptr; 215 216 this->explosionSmoke_=nullptr; 217 this->explosionFire_=nullptr; 218 218 } 219 219 -
code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc
r10765 r10768 61 61 this->server_overwrite_ = 0; 62 62 this->client_overwrite_ = 0; 63 this->player_ = 0;63 this->player_ = nullptr; 64 64 this->formerPlayer_ = nullptr; 65 65 this->playerID_ = OBJECTID_UNKNOWN; 66 this->hud_ = 0;67 this->camera_ = 0;68 this->xmlcontroller_ = 0;69 //this->controller_ = 0;70 this->reverseCamera_ = 0;66 this->hud_ = nullptr; 67 this->camera_ = nullptr; 68 this->xmlcontroller_ = nullptr; 69 //this->controller_ = nullptr; 70 this->reverseCamera_ = nullptr; 71 71 this->bDestroyWhenPlayerLeft_ = false; 72 72 this->cameraPositionRootNode_ = this->node_->createChildSceneNode(); 73 this->currentCameraPosition_ = 0;73 this->currentCameraPosition_ = nullptr; 74 74 this->bMouseLook_ = false; 75 75 this->mouseLookSpeed_ = 200; … … 171 171 ++i; 172 172 } 173 return 0;173 return nullptr; 174 174 } 175 175 … … 241 241 { 242 242 this->camera_->attachToNode(this->cameraPositionRootNode_); 243 this->currentCameraPosition_ = 0;243 this->currentCameraPosition_ = nullptr; 244 244 } 245 245 … … 321 321 if ( !GameMode::isMaster() ) 322 322 { 323 if ( target != 0)323 if ( target != nullptr ) 324 324 { 325 325 callMemberNetworkFunction(&ControllableEntity::setTargetInternal, this->getObjectID(), 0, target->getObjectID() ); … … 372 372 this->stopLocalHumanControl(); 373 373 374 this->player_ = 0;374 this->player_ = nullptr; 375 375 this->playerID_ = OBJECTID_UNKNOWN; 376 376 this->bHasLocalController_ = false; … … 411 411 { 412 412 this->camera_->attachToNode(this->cameraPositionRootNode_); 413 this->currentCameraPosition_ = 0;413 this->currentCameraPosition_ = nullptr; 414 414 } 415 415 } … … 447 447 this->camera_->detachFromParent(); 448 448 this->camera_->destroy(); 449 this->camera_ = 0;449 this->camera_ = nullptr; 450 450 } 451 451 … … 453 453 { 454 454 this->hud_->destroy(); 455 this->hud_ = 0;455 this->hud_ = nullptr; 456 456 } 457 457 } -
code/branches/cpp11_v2/src/orxonox/worldentities/Drone.cc
r9667 r10768 43 43 RegisterObject(Drone); 44 44 45 this->myController_ = 0;45 this->myController_ = nullptr; 46 46 47 47 this->localLinearAcceleration_.setValue(0, 0, 0); -
code/branches/cpp11_v2/src/orxonox/worldentities/ExplosionChunk.cc
r9667 r10768 62 62 { 63 63 orxout(internal_error) << "Couldn't load particle effect in ExplosionChunk: " << ex.what() << endl; 64 this->fire_ = 0;65 this->smoke_ = 0;64 this->fire_ = nullptr; 65 this->smoke_ = nullptr; 66 66 } 67 67 } 68 68 else 69 69 { 70 this->fire_ = 0;71 this->smoke_ = 0;70 this->fire_ = nullptr; 71 this->smoke_ = nullptr; 72 72 } 73 73 -
code/branches/cpp11_v2/src/orxonox/worldentities/MovableEntity.cc
r10216 r10768 50 50 this->overwrite_orientation_ = Quaternion::IDENTITY; 51 51 52 this->continuousResynchroTimer_ = 0;52 this->continuousResynchroTimer_ = nullptr; 53 53 54 54 this->setPriority(Priority::Low); … … 80 80 { 81 81 float damage = this->collisionDamage_ * (victim->getVelocity() - this->getVelocity()).length(); 82 victim->hit( 0, contactPoint, ownCollisionShape, damage);82 victim->hit(nullptr, contactPoint, ownCollisionShape, damage); 83 83 } 84 84 } -
code/branches/cpp11_v2/src/orxonox/worldentities/SpawnPoint.cc
r9667 r10768 43 43 RegisterObject(SpawnPoint); 44 44 45 this->template_ = 0;45 this->template_ = nullptr; 46 46 47 47 if (this->getGametype()) -
code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc
r10765 r10768 77 77 this->node_ = this->getScene()->getRootSceneNode()->createChildSceneNode(); 78 78 79 this->parent_ = 0;79 this->parent_ = nullptr; 80 80 this->parentID_ = OBJECTID_UNKNOWN; 81 81 this->bDeleteWithParent_ = true; … … 90 90 91 91 // Default behaviour does not include physics 92 this->physicalBody_ = 0;92 this->physicalBody_ = nullptr; 93 93 this->bPhysicsActive_ = false; 94 94 this->bPhysicsActiveSynchronised_ = false; … … 498 498 void WorldEntity::notifyDetached() 499 499 { 500 this->parent_ = 0;500 this->parent_ = nullptr; 501 501 this->parentID_ = OBJECTID_UNKNOWN; 502 502 … … 525 525 ++i; 526 526 } 527 return 0;527 return nullptr; 528 528 } 529 529 … … 856 856 deactivatePhysics(); 857 857 delete this->physicalBody_; 858 this->physicalBody_ = 0;858 this->physicalBody_ = nullptr; 859 859 this->collisionType_ = None; 860 860 this->collisionTypeSynchronised_ = None; -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
r10765 r10768 53 53 RegisterClass(ModularSpaceShip); 54 54 55 std::map<StaticEntity*, ShipPart*>* ModularSpaceShip::partMap_s = 0;55 std::map<StaticEntity*, ShipPart*>* ModularSpaceShip::partMap_s = nullptr; 56 56 57 57 ModularSpaceShip::ModularSpaceShip(Context* context) : SpaceShip(context) -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.cc
r10650 r10768 76 76 this->reloadWaitCountdown_ = 0; 77 77 78 this->lastHitOriginator_ = 0;78 this->lastHitOriginator_ = nullptr; 79 79 80 80 // set damage multiplier to default value 1, meaning nominal damage … … 91 91 } 92 92 else 93 this->weaponSystem_ = 0;93 this->weaponSystem_ = nullptr; 94 94 95 95 this->setRadarObjectColour(ColourValue::Red); … … 109 109 else 110 110 { 111 this->explosionSound_ = 0;111 this->explosionSound_ = nullptr; 112 112 } 113 113 } … … 345 345 { 346 346 // delete the AIController // <-- TODO: delete? nothing is deleted here... should we delete the controller? 347 slave->setControllableEntity( 0);347 slave->setControllableEntity(nullptr); 348 348 349 349 // set a new master within the formation … … 509 509 return this->weaponSystem_->getWeaponSlot(index); 510 510 else 511 return 0;511 return nullptr; 512 512 } 513 513 … … 523 523 return this->weaponSystem_->getWeaponSet(index); 524 524 else 525 return 0;525 return nullptr; 526 526 } 527 527 … … 551 551 return this->weaponSystem_->getWeaponPack(index); 552 552 else 553 return 0;553 return nullptr; 554 554 } 555 555 … … 594 594 return it->getController(); 595 595 } 596 return 0;596 return nullptr; 597 597 } 598 598 -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Pawn.h
r10765 r10768 207 207 virtual void spawneffect(); 208 208 209 //virtual void damage(float damage, Pawn* originator = 0);209 //virtual void damage(float damage, Pawn* originator = nullptr); 210 210 virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = nullptr, const btCollisionShape* cs = nullptr); 211 211 -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc
r10765 r10768 494 494 Camera* camera = this->getCamera(); 495 495 //Shaking Camera effect 496 if (camera != 0)496 if (camera != nullptr) 497 497 camera->setOrientation(Vector3::UNIT_X, angle); 498 498 … … 526 526 { 527 527 Camera *camera = this->getCamera(); 528 if (camera == 0)528 if (camera == nullptr) 529 529 { 530 530 orxout(internal_warning) << "Failed to reset camera!" << endl; -
code/branches/cpp11_v2/src/orxonox/worldentities/pawns/Spectator.cc
r10624 r10768 58 58 this->localVelocity_ = Vector3::ZERO; 59 59 this->setHudTemplate("spectatorhud"); 60 this->greetingFlare_ = 0;60 this->greetingFlare_ = nullptr; 61 61 62 62 this->setDestroyWhenPlayerLeft(true);
Note: See TracChangeset
for help on using the changeset viewer.