Changeset 10768 for code/branches/cpp11_v2/src/orxonox
- Timestamp:
- Nov 6, 2015, 10:54:34 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/orxonox
- Files:
-
- 71 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/orxonox/CameraManager.cc
r10765 r10768 60 60 return this->cameraList_.front(); 61 61 else 62 return 0;62 return nullptr; 63 63 } 64 64 -
code/branches/cpp11_v2/src/orxonox/Level.cc
r10624 r10768 54 54 this->registerVariables(); 55 55 this->xmlfilename_ = this->getFilename(); 56 this->xmlfile_ = 0;56 this->xmlfile_ = nullptr; 57 57 } 58 58 … … 178 178 ++i; 179 179 } 180 return 0;180 return nullptr; 181 181 } 182 182 … … 195 195 return this->lodInformation_.find(meshName)->second; 196 196 197 return 0;197 return nullptr; 198 198 } 199 199 … … 207 207 { 208 208 orxout(internal_info) << "player left level (id: " << player->getClientID() << ", name: " << player->getName() << ')' << endl; 209 player->switchGametype( 0);209 player->switchGametype(nullptr); 210 210 } 211 211 } -
code/branches/cpp11_v2/src/orxonox/LevelManager.cc
r10765 r10768 161 161 return this->levels_.front(); 162 162 else 163 return 0;163 return nullptr; 164 164 } 165 165 -
code/branches/cpp11_v2/src/orxonox/PlayerManager.cc
r10624 r10768 62 62 63 63 // create new HumanPlayer instance 64 HumanPlayer* player = new HumanPlayer( 0);64 HumanPlayer* player = new HumanPlayer(nullptr); 65 65 player->setClientID(clientID); 66 66 … … 115 115 return (*it); 116 116 } 117 return 0;117 return nullptr; 118 118 } 119 119 } -
code/branches/cpp11_v2/src/orxonox/Radar.cc
r10624 r10768 49 49 50 50 Radar::Radar() 51 : itFocus_( 0)52 , focus_( 0)51 : itFocus_(nullptr) 52 , focus_(nullptr) 53 53 , objectTypeCounter_(0) 54 54 { … … 106 106 return *(this->itFocus_); 107 107 else 108 return 0;108 return nullptr; 109 109 } 110 110 … … 126 126 { 127 127 // focus object was deleted, release focus 128 this->focus_ = 0;129 this->itFocus_ = 0;128 this->focus_ = nullptr; 129 this->itFocus_ = nullptr; 130 130 } 131 131 … … 141 141 { 142 142 // list is empty 143 this->itFocus_ = 0;144 this->focus_ = 0;143 this->itFocus_ = nullptr; 144 this->focus_ = nullptr; 145 145 } 146 146 … … 156 156 float nextDistance = FLT_MAX; 157 157 float minimumDistance = FLT_MAX; 158 ObjectList<RadarViewable>::iterator itFallback = 0;158 ObjectList<RadarViewable>::iterator itFallback = nullptr; 159 159 160 160 for (ObjectList<RadarViewable>::iterator it = ObjectList<RadarViewable>::begin(); it; ++it) … … 191 191 void Radar::releaseFocus() 192 192 { 193 this->itFocus_ = 0;194 this->focus_ = 0;193 this->itFocus_ = nullptr; 194 this->focus_ = nullptr; 195 195 } 196 196 -
code/branches/cpp11_v2/src/orxonox/Scene.cc
r10765 r10768 84 84 this->rootSceneNode_ = this->sceneManager_->getRootSceneNode(); 85 85 86 this->radar_ = 0;86 this->radar_ = nullptr; 87 87 } 88 88 … … 92 92 this->positiveWorldRange_ = Vector3::UNIT_SCALE * defaultMaxWorldSize; 93 93 this->gravity_ = Vector3::ZERO; 94 this->physicalWorld_ = 0;95 this->solver_ = 0;96 this->dispatcher_ = 0;97 this->collisionConfig_ = 0;98 this->broadphase_ = 0;94 this->physicalWorld_ = nullptr; 95 this->solver_ = nullptr; 96 this->dispatcher_ = nullptr; 97 this->collisionConfig_ = nullptr; 98 this->broadphase_ = nullptr; 99 99 100 100 this->registerVariables(); … … 234 234 delete this->collisionConfig_; 235 235 delete this->broadphase_; 236 this->physicalWorld_ = 0;237 this->solver_ = 0;238 this->dispatcher_ = 0;239 this->collisionConfig_ = 0;240 this->broadphase_ = 0;236 this->physicalWorld_ = nullptr; 237 this->solver_ = nullptr; 238 this->dispatcher_ = nullptr; 239 this->collisionConfig_ = nullptr; 240 this->broadphase_ = nullptr; 241 241 } 242 242 } … … 327 327 ++i; 328 328 } 329 return 0;329 return nullptr; 330 330 } 331 331 -
code/branches/cpp11_v2/src/orxonox/Scene.h
r10624 r10768 111 111 public: 112 112 inline bool hasPhysics() const 113 { return this->physicalWorld_ != 0; }113 { return this->physicalWorld_ != nullptr; } 114 114 void setPhysicalWorld(bool wantsPhysics); 115 115 -
code/branches/cpp11_v2/src/orxonox/Test.cc
r10624 r10768 54 54 registerMemberNetworkFunction( Test, printBlaBla ); 55 55 56 Test* Test::instance_ = 0;56 Test* Test::instance_ = nullptr; 57 57 58 58 Test::Test(Context* context) : BaseObject(context), Synchronisable(context) 59 59 { 60 assert(instance_== 0);60 assert(instance_==nullptr); 61 61 instance_=this; 62 62 RegisterObject ( Test ); … … 64 64 registerVariables(); 65 65 setSyncMode(0x3); 66 this->pointer_ = 0;66 this->pointer_ = nullptr; 67 67 } 68 68 69 69 Test::~Test() 70 70 { 71 instance_= 0;71 instance_=nullptr; 72 72 } 73 73 -
code/branches/cpp11_v2/src/orxonox/collisionshapes/CollisionShape.cc
r10624 r10768 57 57 RegisterObject(CollisionShape); 58 58 59 this->parent_ = 0;59 this->parent_ = nullptr; 60 60 this->parentID_ = OBJECTID_UNKNOWN; 61 this->collisionShape_ = 0;61 this->collisionShape_ = nullptr; 62 62 this->position_ = Vector3::ZERO; 63 63 this->orientation_ = Quaternion::IDENTITY; … … 154 154 void CollisionShape::notifyDetached() 155 155 { 156 this->parent_ = 0;156 this->parent_ = nullptr; 157 157 this->parentID_ = OBJECTID_UNKNOWN; 158 158 } -
code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc
r10765 r10768 197 197 void CompoundCollisionShape::updatePublicShape() 198 198 { 199 btCollisionShape* primitive = 0; // The primitive shape, if there is one.199 btCollisionShape* primitive = nullptr; // The primitive shape, if there is one. 200 200 bool bPrimitive = true; // Whether the CompoundCollisionShape has just one non-empty CollisionShape. And that shape also has no transformation. 201 201 bool bEmpty = true; // Whether the CompoundCollisionShape is empty. … … 221 221 { 222 222 // If there was none all along, nothing needs to be changed. 223 if (this->collisionShape_ == 0)223 if (this->collisionShape_ == nullptr) 224 224 return; 225 this->collisionShape_ = 0;225 this->collisionShape_ = nullptr; 226 226 } 227 227 // If the CompoundCollisionShape is just a primitive. … … 253 253 ++i; 254 254 } 255 return 0;255 return nullptr; 256 256 } 257 257 -
code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.h
r9667 r10768 75 75 void updatePublicShape(); 76 76 inline virtual btCollisionShape* createNewShape() const 77 { assert(false); return 0; }77 { assert(false); return nullptr; } 78 78 79 79 btCompoundShape* compoundShape_; -
code/branches/cpp11_v2/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc
r10765 r10768 54 54 CollisionShape::updateParent(); 55 55 56 assert(this->worldEntityOwner_ != 0);56 assert(this->worldEntityOwner_ != nullptr); 57 57 this->worldEntityOwner_->notifyCollisionShapeChanged(); 58 58 } -
code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.cc
r10765 r10768 177 177 { 178 178 this->weaponModes_.clear(); // reset previous weapon information 179 WeaponSlot* wSlot = 0;179 WeaponSlot* wSlot = nullptr; 180 180 for(int l=0; (wSlot = pawn->getWeaponSlot(l)) ; l++) 181 181 { 182 WeaponMode* wMode = 0;182 WeaponMode* wMode = nullptr; 183 183 for(int i=0; (wMode = wSlot->getWeapon()->getWeaponmode(i)) ; i++) 184 184 { … … 249 249 return this->waypoints_[index]; 250 250 else 251 return 0;251 return nullptr; 252 252 } 253 253 -
code/branches/cpp11_v2/src/orxonox/controllers/Controller.cc
r9797 r10768 40 40 RegisterObject(Controller); 41 41 42 this->player_ = 0;43 this->controllableEntity_ = 0;42 this->player_ = nullptr; 43 this->controllableEntity_ = nullptr; 44 44 this->bGodMode_ = false; 45 45 this->team_=-1; -
code/branches/cpp11_v2/src/orxonox/controllers/DroneController.cc
r9667 r10768 49 49 RegisterObject(DroneController); 50 50 51 this->owner_ = 0;52 this->drone_ = 0;51 this->owner_ = nullptr; 52 this->drone_ = nullptr; 53 53 this->isShooting_ = false; 54 54 this->setAccuracy(10); -
code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc
r10765 r10768 72 72 RegisterObject(FormationController); 73 73 74 this->target_ = 0;74 this->target_ = nullptr; 75 75 this->formationFlight_ = false; 76 76 this->passive_ = false; 77 77 this->maxFormationSize_ = STANDARD_MAX_FORMATION_SIZE; 78 this->myMaster_ = 0;78 this->myMaster_ = nullptr; 79 79 this->freedomCount_ = 0; 80 80 … … 104 104 { 105 105 orxout(internal_error) << this << " is still master in " << (*it) << endl; 106 it->myMaster_ = 0;106 it->myMaster_ = nullptr; 107 107 } 108 108 … … 142 142 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 143 143 { 144 Controller* controller = 0;144 Controller* controller = nullptr; 145 145 146 146 if (it->getController()) … … 173 173 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 174 174 { 175 Controller* controller = 0;175 Controller* controller = nullptr; 176 176 177 177 if (it->getController()) … … 203 203 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 204 204 { 205 Controller* controller = 0;205 Controller* controller = nullptr; 206 206 207 207 if (it->getController()) … … 230 230 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 231 231 { 232 Controller* controller = 0;232 Controller* controller = nullptr; 233 233 234 234 if (it->getController()) … … 383 383 } 384 384 385 this->myMaster_ = 0;385 this->myMaster_ = nullptr; 386 386 this->state_ = FREE; 387 387 } … … 411 411 412 412 //has it an FormationController? 413 Controller* controller = 0;413 Controller* controller = nullptr; 414 414 415 415 if (it->getController()) … … 458 458 { 459 459 this->state_ = MASTER; 460 this->myMaster_ = 0;460 this->myMaster_ = nullptr; 461 461 } 462 462 } … … 518 518 newMaster->state_ = MASTER; 519 519 newMaster->slaves_ = this->slaves_; 520 newMaster->myMaster_ = 0;520 newMaster->myMaster_ = nullptr; 521 521 522 522 for(std::vector<FormationController*>::iterator it = newMaster->slaves_.begin(); it != newMaster->slaves_.end(); it++) … … 547 547 newMaster->state_ = MASTER; 548 548 newMaster->slaves_ = this->slaves_; 549 newMaster->myMaster_ = 0;549 newMaster->myMaster_ = nullptr; 550 550 551 551 for(std::vector<FormationController*>::iterator it = newMaster->slaves_.begin(); it != newMaster->slaves_.end(); it++) … … 572 572 { 573 573 (*it)->state_ = FREE; 574 (*it)->myMaster_ = 0;574 (*it)->myMaster_ = nullptr; 575 575 } 576 576 this->slaves_.clear(); … … 629 629 630 630 //search new Master, then take lead 631 if (this->state_==FREE && this->myMaster_== 0)631 if (this->state_==FREE && this->myMaster_==nullptr) 632 632 { 633 633 searchNewMaster(); … … 654 654 (*it)->myMaster_=this; 655 655 } 656 this->myMaster_= 0;656 this->myMaster_=nullptr; 657 657 this->state_=MASTER; 658 658 } … … 779 779 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 780 780 { 781 Controller* controller = 0;781 Controller* controller = nullptr; 782 782 783 783 if (it->getController()) … … 943 943 void FormationController::forgetTarget() 944 944 { 945 this->target_ = 0;945 this->target_ = nullptr; 946 946 this->bShooting_ = false; 947 947 } … … 963 963 int team2 = entity2->getTeam(); 964 964 965 Controller* controller = 0;965 Controller* controller = nullptr; 966 966 if (entity1->getController()) 967 967 controller = entity1->getController(); … … 996 996 } 997 997 998 TeamBaseMatchBase* base = 0;998 TeamBaseMatchBase* base = nullptr; 999 999 base = orxonox_cast<TeamBaseMatchBase*>(entity1); 1000 1000 if (base) … … 1030 1030 } 1031 1031 1032 DroneController* droneController = 0;1032 DroneController* droneController = nullptr; 1033 1033 droneController = orxonox_cast<DroneController*>(entity1->getController()); 1034 1034 if (droneController && static_cast<ControllableEntity*>(droneController->getOwner()) == entity2) -
code/branches/cpp11_v2/src/orxonox/controllers/HumanController.cc
r10765 r10768 65 65 RegisterUnloadableClass(HumanController); 66 66 67 HumanController* HumanController::localController_s = 0;67 HumanController* HumanController::localController_s = nullptr; 68 68 69 69 HumanController::HumanController(Context* context) : FormationController(context) … … 81 81 HumanController::localController_s->removeFromFormation(); 82 82 } 83 HumanController::localController_s = 0;83 HumanController::localController_s = nullptr; 84 84 } 85 85 -
code/branches/cpp11_v2/src/orxonox/controllers/NewHumanController.cc
r10765 r10768 58 58 RegisterUnloadableClass(NewHumanController); 59 59 60 NewHumanController* NewHumanController::localController_s = 0;60 NewHumanController* NewHumanController::localController_s = nullptr; 61 61 62 62 NewHumanController::NewHumanController(Context* context) … … 445 445 pawn->setAimPosition( mouseRay.getOrigin() + mouseRay.getDirection() * 3000 ); 446 446 447 if( this->getControllableEntity() && this->getControllableEntity()->getTarget() != 0)448 this->getControllableEntity()->setTarget( 0);447 if( this->getControllableEntity() && this->getControllableEntity()->getTarget() != nullptr ) 448 this->getControllableEntity()->setTarget( nullptr ); 449 449 450 450 //return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getWorldOrientation() * Vector3::NEGATIVE_UNIT_Z * 2000); -
code/branches/cpp11_v2/src/orxonox/controllers/WaypointPatrolController.cc
r9716 r10768 101 101 102 102 if (shortestsqdistance > (this->alertnessradius_ * this->alertnessradius_)) 103 this->target_ = 0;103 this->target_ = nullptr; 104 104 } 105 105 } -
code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc
r10765 r10768 65 65 GSLevel::GSLevel(const GameStateInfo& info) 66 66 : GameState(info) 67 , gameInputState_( 0)68 , guiMouseOnlyInputState_( 0)69 , guiKeysOnlyInputState_( 0)70 , startFile_( 0)67 , gameInputState_(nullptr) 68 , guiMouseOnlyInputState_(nullptr) 69 , guiKeysOnlyInputState_(nullptr) 70 , startFile_(nullptr) 71 71 , bShowIngameGUI_(false) 72 72 { … … 143 143 #endif 144 144 145 gameInputState_->setHandler( 0);146 guiMouseOnlyInputState_->setHandler( 0);147 guiKeysOnlyInputState_->setHandler( 0);145 gameInputState_->setHandler(nullptr); 146 guiMouseOnlyInputState_->setHandler(nullptr); 147 guiKeysOnlyInputState_->setHandler(nullptr); 148 148 InputManager::getInstance().destroyState("game"); 149 149 InputManager::getInstance().destroyState("guiKeysOnly"); -
code/branches/cpp11_v2/src/orxonox/gamestates/GSMainMenu.cc
r10765 r10768 132 132 InputManager::getInstance().leaveState("MainMenuHackery"); 133 133 134 GraphicsManager::getInstance().setCamera( 0);134 GraphicsManager::getInstance().setCamera(nullptr); 135 135 GUIManager::getInstance().setBackgroundImage(""); 136 136 GUIManager::hideGUI("MainMenu"); … … 140 140 ModifyConsoleCommand(__CC_startClient_name ).deactivate(); 141 141 ModifyConsoleCommand(__CC_startDedicated_name ).deactivate(); 142 ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject( 0);142 ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(nullptr); 143 143 } 144 144 -
code/branches/cpp11_v2/src/orxonox/gamestates/GSRoot.cc
r10624 r10768 98 98 void GSRoot::deactivate() 99 99 { 100 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject( 0);101 ModifyConsoleCommand(__CC_getTimeFactor_name).setObject( 0);102 ModifyConsoleCommand(__CC_setPause_name).setObject( 0);103 ModifyConsoleCommand(__CC_pause_name).setObject( 0);100 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(nullptr); 101 ModifyConsoleCommand(__CC_getTimeFactor_name).setObject(nullptr); 102 ModifyConsoleCommand(__CC_setPause_name).setObject(nullptr); 103 ModifyConsoleCommand(__CC_pause_name).setObject(nullptr); 104 104 } 105 105 -
code/branches/cpp11_v2/src/orxonox/gamestates/GSServer.cc
r10624 r10768 44 44 GSServer::GSServer(const GameStateInfo& info) 45 45 : GameState(info) 46 , server_( 0)46 , server_(nullptr) 47 47 { 48 48 } -
code/branches/cpp11_v2/src/orxonox/gametypes/Asteroids.h
r9667 r10768 50 50 51 51 protected: 52 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);52 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 53 53 54 54 private: -
code/branches/cpp11_v2/src/orxonox/gametypes/Deathmatch.h
r9667 r10768 47 47 virtual bool playerChangedName(PlayerInfo* player); 48 48 49 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);49 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 50 50 virtual void playerScored(PlayerInfo* player, int score = 1); 51 51 }; -
code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.cc
r10624 r10768 685 685 } 686 686 687 return 0;687 return nullptr; 688 688 } 689 689 -
code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.h
r10624 r10768 64 64 bool tutorial; //goal: new players receive messages how the new gametype works - later it can be switched off. 65 65 66 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //ok - score function and management of parties67 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //ok - simple66 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); //ok - score function and management of parties 67 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); //ok - simple 68 68 virtual void start(); 69 69 virtual void end(); //Wie geht das mit der Punkteausgabe aendern? Z.B: Persoenliche Nachricht? -
code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc
r10765 r10768 66 66 67 67 this->defaultControllableEntity_ = Class(Spectator); 68 this->scoreboard_ = 0;68 this->scoreboard_ = nullptr; 69 69 70 70 this->bAutoStart_ = false; … … 361 361 return fallbackSpawnPoint; 362 362 } 363 return 0;363 return nullptr; 364 364 } 365 365 -
code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.h
r10624 r10768 96 96 virtual void playerScored(PlayerInfo* player, int score = 1); 97 97 98 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);99 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);100 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);101 102 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);98 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = nullptr); 99 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); 100 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); 101 102 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 103 103 virtual void pawnPreSpawn(Pawn* pawn); 104 104 virtual void pawnPostSpawn(Pawn* pawn); -
code/branches/cpp11_v2/src/orxonox/gametypes/LastManStanding.h
r9667 r10768 69 69 void setConfigValues(); //!< Makes values configurable. 70 70 71 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //!< If a player shoot's an opponent, his punishment countdown will be resetted.72 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //!< Manages each players lives.71 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); //!< If a player shoot's an opponent, his punishment countdown will be resetted. 72 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); //!< Manages each players lives. 73 73 74 74 virtual void end(); //!< Sends an end message. -
code/branches/cpp11_v2/src/orxonox/gametypes/LastTeamStanding.h
r9667 r10768 77 77 virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables. 78 78 79 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //!< Manages each player's lost lives.80 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //!< If a player shoot's an opponent, his punishment countdown will be resetted.79 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); //!< Manages each player's lost lives. 80 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); //!< If a player shoot's an opponent, his punishment countdown will be resetted. 81 81 virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn); //!< Resets punishment time and respawn delay. 82 82 void tick (float dt); //!< used to end the game -
code/branches/cpp11_v2/src/orxonox/gametypes/Mission.h
r9729 r10768 58 58 59 59 protected: 60 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);60 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 61 61 bool missionAccomplished_; //<! indicates if player successfully finsihed the mission; 62 62 int lives_; //<! amount of player's lives <-> nr. of retries -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.cc
r9667 r10768 264 264 return (*it); 265 265 } 266 return 0;266 return nullptr; 267 267 } 268 268 -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.h
r9667 r10768 44 44 virtual ~TeamBaseMatch() {} 45 45 46 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);46 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); 47 47 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator); 48 48 -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamDeathmatch.h
r9941 r10768 48 48 virtual bool playerChangedName(PlayerInfo* player); 49 49 50 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);50 virtual void pawnKilled(Pawn* victim, Pawn* killer = nullptr); 51 51 virtual void playerScored(PlayerInfo* player, int score = 1); 52 52 protected: -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc
r10765 r10768 277 277 } 278 278 279 return 0;279 return nullptr; 280 280 } 281 281 … … 340 340 ControllableEntity* entity = orxonox_cast<ControllableEntity*>(pawn); 341 341 342 Controller* controller = 0;342 Controller* controller = nullptr; 343 343 if (entity->getController()) 344 344 controller = entity->getController(); -
code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.h
r9941 r10768 51 51 virtual void spawnDeadPlayersIfRequested(); //!< Prevents players to respawn. 52 52 53 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);54 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);55 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);53 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = nullptr); 54 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); 55 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); 56 56 57 57 virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn); -
code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.cc
r9941 r10768 48 48 this->gameTime_ = 180; 49 49 this->teams_ = 2; 50 this->destroyer_ = 0;50 this->destroyer_ = nullptr; 51 51 this->destroyer_.setCallback(createFunctor(&UnderAttack::killedDestroyer, this)); 52 52 this->gameEnded_ = false; … … 202 202 void UnderAttack::setTransporterHealth() 203 203 { 204 if (this->destroyer_ != 0)204 if (this->destroyer_ != nullptr) 205 205 { 206 206 //Calculation: Each attacker deals about 3500 damage. A human attacker deals 1500 damage additionally. -
code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.h
r9941 r10768 48 48 { return this->destroyer_; } 49 49 50 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);51 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);52 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);50 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = nullptr); 51 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = nullptr); 52 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = nullptr); 53 53 virtual void playerEntered(PlayerInfo* player); 54 54 -
code/branches/cpp11_v2/src/orxonox/graphics/Backlight.cc
r9667 r10768 51 51 RegisterObject(Backlight); 52 52 53 this->ribbonTrail_ = 0;54 this->ribbonTrailNode_ = 0;53 this->ribbonTrail_ = nullptr; 54 this->ribbonTrailNode_ = nullptr; 55 55 56 56 this->width_ = 0; -
code/branches/cpp11_v2/src/orxonox/graphics/Light.cc
r9667 r10768 53 53 RegisterObject(Light); 54 54 55 this->light_ = 0;55 this->light_ = nullptr; 56 56 this->diffuse_ = ColourValue::White; 57 57 this->specular_ = ColourValue::White; -
code/branches/cpp11_v2/src/orxonox/graphics/Model.cc
r10765 r10768 134 134 Level* level = this->getLevel(); 135 135 136 assert( level != 0);136 assert( level != nullptr ); 137 137 138 138 MeshLodInformation* lodInfo = level->getLodInfo(this->meshSrc_); -
code/branches/cpp11_v2/src/orxonox/graphics/ParticleEmitter.cc
r9950 r10768 52 52 ThrowException(AbortLoading, "Can't create ParticleEmitter, no scene or no scene manager given."); 53 53 54 this->particles_ = 0;54 this->particles_ = nullptr; 55 55 this->LOD_ = LODParticle::Normal; 56 56 … … 102 102 { 103 103 delete this->particles_; 104 this->particles_ = 0;104 this->particles_ = nullptr; 105 105 } 106 106 -
code/branches/cpp11_v2/src/orxonox/infos/HumanPlayer.cc
r10624 r10768 53 53 this->defaultController_ = Class(NewHumanController); 54 54 55 this->humanHud_ = 0;56 this->gametypeHud_ = 0;55 this->humanHud_ = nullptr; 56 this->gametypeHud_ = nullptr; 57 57 58 58 this->setConfigValues(); … … 178 178 { 179 179 this->humanHud_->destroy(); 180 this->humanHud_ = 0;180 this->humanHud_ = nullptr; 181 181 } 182 182 … … 194 194 { 195 195 this->gametypeHud_->destroy(); 196 this->gametypeHud_ = 0;196 this->gametypeHud_ = nullptr; 197 197 } 198 198 -
code/branches/cpp11_v2/src/orxonox/infos/PlayerInfo.cc
r10765 r10768 51 51 this->bReadyToSpawn_ = false; 52 52 this->bSetUnreadyAfterSpawn_ = true; 53 this->controller_ = 0;54 this->controllableEntity_ = 0;53 this->controller_ = nullptr; 54 this->controllableEntity_ = nullptr; 55 55 this->controllableEntityID_ = OBJECTID_UNKNOWN; 56 56 57 this->gtinfo_ = 0;57 this->gtinfo_ = nullptr; 58 58 this->gtinfoID_ = OBJECTID_UNKNOWN; 59 59 this->updateGametypeInfo(this->getGametype()); … … 72 72 { 73 73 this->controller_->destroy(); 74 this->controller_ = 0;74 this->controller_ = nullptr; 75 75 } 76 76 … … 126 126 void PlayerInfo::updateGametypeInfo(Gametype* gametype) 127 127 { 128 this->gtinfo_ = 0;128 this->gtinfo_ = nullptr; 129 129 this->gtinfoID_ = OBJECTID_UNKNOWN; 130 130 … … 141 141 { 142 142 this->controller_->destroy(); 143 this->controller_ = 0;143 this->controller_ = nullptr; 144 144 } 145 145 this->controller_ = this->defaultController_.fabricate(this->getContext()); … … 214 214 return; 215 215 216 this->controllableEntity_->setController( 0);217 this->controllableEntity_ = 0;216 this->controllableEntity_->setController(nullptr); 217 this->controllableEntity_ = nullptr; 218 218 this->controllableEntityID_ = OBJECTID_UNKNOWN; 219 219 220 220 if (this->controller_) 221 this->controller_->setControllableEntity( 0);221 this->controller_->setControllableEntity(nullptr); 222 222 223 223 if ( GameMode::isMaster() ) … … 242 242 tmp->setActive(false); 243 243 //this->controllableEntity_->getController()->setControllableEntity(nullptr); 244 this->controllableEntity_->setController( 0);244 this->controllableEntity_->setController(nullptr); 245 245 } 246 246 … … 253 253 return; 254 254 255 this->controllableEntity_->setController( 0);255 this->controllableEntity_->setController(nullptr); 256 256 if(this->isHumanPlayer()) // TODO: Multiplayer? 257 257 this->controllableEntity_->destroyHud(); // HACK-ish -
code/branches/cpp11_v2/src/orxonox/interfaces/RadarViewable.h
r10624 r10768 66 66 if (name == "HIDDEN") 67 67 { 68 this->bVisibility_ = 0;68 this->bVisibility_ = false; 69 69 this->settingsChanged(); 70 70 } -
code/branches/cpp11_v2/src/orxonox/items/Engine.cc
r10765 r10768 50 50 RegisterObject(Engine); 51 51 52 this->ship_ = 0;52 this->ship_ = nullptr; 53 53 this->shipID_ = OBJECTID_UNKNOWN; 54 54 this->relativePosition_ = Vector3::ZERO; … … 136 136 void Engine::networkcallback_shipID() 137 137 { 138 this->ship_ = 0;138 this->ship_ = nullptr; 139 139 140 140 if (this->shipID_ != OBJECTID_UNKNOWN) -
code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc
r10765 r10768 67 67 else 68 68 { 69 this->defEngineSndBoost_ = 0;70 this->defEngineSndNormal_ = 0;71 this->lua_ = 0;69 this->defEngineSndBoost_ = nullptr; 70 this->defEngineSndNormal_ = nullptr; 71 this->lua_ = nullptr; 72 72 } 73 73 this->state_ = 0; -
code/branches/cpp11_v2/src/orxonox/overlays/InGameConsole.cc
r10624 r10768 75 75 : shell_(new Shell("InGameConsole", true)) 76 76 , bShowCursor_(false) 77 , consoleOverlay_( 0)78 , consoleOverlayContainer_( 0)79 , consoleOverlayNoise_( 0)80 , consoleOverlayCursor_( 0)81 , consoleOverlayBorder_( 0)82 , consoleOverlayTextAreas_( 0)83 , inputState_( 0)77 , consoleOverlay_(nullptr) 78 , consoleOverlayContainer_(nullptr) 79 , consoleOverlayNoise_(nullptr) 80 , consoleOverlayCursor_(nullptr) 81 , consoleOverlayBorder_(nullptr) 82 , consoleOverlayTextAreas_(nullptr) 83 , inputState_(nullptr) 84 84 { 85 85 RegisterObject(InGameConsole); … … 130 130 if (this->consoleOverlayTextAreas_[i]) 131 131 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->consoleOverlayTextAreas_[i]); 132 this->consoleOverlayTextAreas_[i] = 0;132 this->consoleOverlayTextAreas_[i] = nullptr; 133 133 } 134 134 … … 140 140 { 141 141 delete[] this->consoleOverlayTextAreas_; 142 this->consoleOverlayTextAreas_ = 0;142 this->consoleOverlayTextAreas_ = nullptr; 143 143 } 144 144 … … 175 175 else 176 176 { 177 inputState_->setMouseHandler( 0);178 inputState_->setJoyStickHandler( 0);177 inputState_->setMouseHandler(nullptr); 178 inputState_->setJoyStickHandler(nullptr); 179 179 } 180 180 } -
code/branches/cpp11_v2/src/orxonox/overlays/OrxonoxOverlay.cc
r10624 r10768 70 70 RegisterObject(OrxonoxOverlay); 71 71 72 this->owner_ = 0;73 this->group_ = 0;72 this->owner_ = nullptr; 73 this->group_ = nullptr; 74 74 75 75 if (!GameMode::showsGraphics()) -
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc
r10624 r10768 54 54 RegisterObject(OverlayGroup); 55 55 56 this->owner_ = 0;56 this->owner_ = nullptr; 57 57 58 58 setScale(Vector2(1.0, 1.0)); … … 139 139 } 140 140 else 141 return 0;141 return nullptr; 142 142 } 143 143 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc
r9667 r10768 65 65 // For separated magazines we definitively need a given user 66 66 if (!user) 67 return 0;67 return nullptr; 68 68 69 69 // Use the map to get the magazine assigned to the given user … … 79 79 } 80 80 81 return 0;81 return nullptr; 82 82 } 83 83 … … 236 236 // If we don't use separate magazines, set user to 0 237 237 if (!this->bUseSeparateMagazines_) 238 user = 0;238 user = nullptr; 239 239 240 240 // Remove the current magazine for the given user … … 442 442 // If we don't use separate magazines, set user to 0 443 443 if (!this->bUseSeparateMagazines_) 444 user = 0;444 user = nullptr; 445 445 446 446 // Remove the current magazine for the given user -
code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc
r10650 r10768 45 45 RegisterObject(Weapon); 46 46 47 this->weaponPack_ = 0;48 this->weaponSlot_ = 0;47 this->weaponPack_ = nullptr; 48 this->weaponSlot_ = nullptr; 49 49 this->bReloading_ = false; 50 50 this->reloadingWeaponmode_ = WeaponSystem::WEAPON_MODE_UNASSIGNED; … … 92 92 ++i; 93 93 } 94 return 0;94 return nullptr; 95 95 } 96 96 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponMode.cc
r10650 r10768 51 51 RegisterObject(WeaponMode); 52 52 53 this->weapon_ = 0;53 this->weapon_ = nullptr; 54 54 this->mode_ = WeaponSystem::WEAPON_MODE_UNASSIGNED; 55 55 56 this->munition_ = 0;56 this->munition_ = nullptr; 57 57 this->initialMunition_ = 0; 58 58 this->initialMagazines_ = 0; … … 232 232 } 233 233 else 234 this->munition_ = 0;234 this->munition_ = nullptr; 235 235 } 236 236 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponPack.cc
r10650 r10768 44 44 RegisterObject(WeaponPack); 45 45 46 this->weaponSystem_ = 0;46 this->weaponSystem_ = nullptr; 47 47 } 48 48 … … 107 107 assert(it != this->weapons_.end()); 108 108 this->weapons_.erase(it); 109 weapon->setWeaponPack( 0);109 weapon->setWeaponPack(nullptr); 110 110 } 111 111 … … 121 121 } 122 122 123 return 0;123 return nullptr; 124 124 } 125 125 … … 139 139 ++i; 140 140 } 141 return 0;141 return nullptr; 142 142 } 143 143 -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSet.cc
r10650 r10768 43 43 RegisterObject(WeaponSet); 44 44 45 this->weaponSystem_ = 0;45 this->weaponSystem_ = nullptr; 46 46 this->desiredFiremode_ = WeaponSystem::FIRE_MODE_UNASSIGNED; 47 47 } -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSlot.cc
r10648 r10768 43 43 RegisterObject(WeaponSlot); 44 44 45 this->weaponSystem_ = 0;46 this->weapon_ = 0;45 this->weaponSystem_ = nullptr; 46 this->weapon_ = nullptr; 47 47 48 48 this->setSyncMode(ObjectDirection::None); … … 88 88 if (this->weapon_) 89 89 { 90 this->weapon_->setWeaponSlot( 0);91 this->weapon_ = 0;90 this->weapon_->setWeaponSlot(nullptr); 91 this->weapon_ = nullptr; 92 92 } 93 93 } -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSlot.h
r10650 r10768 74 74 */ 75 75 inline bool isOccupied() const 76 { return (this->weapon_ != 0); }76 { return (this->weapon_ != nullptr); } 77 77 78 78 inline void setWeaponSystem(WeaponSystem * weaponSystem) -
code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSystem.cc
r10650 r10768 52 52 RegisterObject(WeaponSystem); 53 53 54 this->pawn_ = 0;54 this->pawn_ = nullptr; 55 55 } 56 56 … … 60 60 { 61 61 if (this->pawn_) 62 this->pawn_->setWeaponSystem( 0);62 this->pawn_->setWeaponSystem(nullptr); 63 63 64 64 while (!this->weaponSets_.empty()) … … 112 112 return (*it); 113 113 } 114 return 0;114 return nullptr; 115 115 } 116 116 … … 159 159 return it->second; 160 160 } 161 return 0;161 return nullptr; 162 162 } 163 163 … … 213 213 // Remove all weapons from their WeaponSlot 214 214 unsigned int i = 0; 215 Weapon* weapon = 0;215 Weapon* weapon = nullptr; 216 216 while ((weapon = wPack->getWeapon(i++))) 217 217 if (weapon->getWeaponSlot()) … … 237 237 return (*it); 238 238 } 239 return 0;239 return nullptr; 240 240 } 241 241 … … 303 303 { 304 304 if (!identifier || !identifier->getIdentifier()) 305 return 0;305 return nullptr; 306 306 307 307 std::map<Identifier *, Munition *>::iterator it = this->munitions_.find(identifier->getIdentifier()); … … 318 318 else 319 319 { 320 return 0;320 return nullptr; 321 321 } 322 322 } -
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.