Changeset 10768 for code/branches/cpp11_v2/src/orxonox/controllers
- Timestamp:
- Nov 6, 2015, 10:54:34 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/orxonox/controllers
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.