Changeset 8733 for code/branches
- Timestamp:
- Jul 5, 2011, 11:59:37 PM (13 years ago)
- Location:
- code/branches/ai2/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai2/src/modules/weapons/projectiles/Rocket.cc
r8723 r8733 58 58 this->localAngularVelocity_ = 0; 59 59 this->lifetime_ = 100; 60 this->bIsRocket =true;60 this->bIsRocket_= true; 61 61 62 62 if (GameMode::isMaster()) … … 117 117 if(this->isInitialized()) 118 118 { 119 this->bIsRocket =false;119 this->bIsRocket_= false; 120 120 if (GameMode::isMaster()) 121 121 { -
code/branches/ai2/src/orxonox/controllers/AIController.cc
r8732 r8733 230 230 this->moveToTargetPosition(); 231 231 232 if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(math::pi / 20.0f)) 233 this->getControllableEntity()->fire(0); 232 this->doFire(); 234 233 } 235 234 … … 267 266 this->moveToTargetPosition(); 268 267 269 if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(math::pi / 20.0f)) 270 this->getControllableEntity()->fire(0); 268 this->doFire(); 271 269 } 272 270 }//END_OF DEFAULT MODE -
code/branches/ai2/src/orxonox/controllers/ArtificialController.cc
r8723 r8733 1049 1049 else if((weapons[3]==3)&& this->isCloseAtTarget(400) /*&&projectiles[3]*/ ) 1050 1050 {//ROCKET: mid range weapon 1051 //TODO: Which weapon is the rocket?How many rockets are available?1051 //TODO: How many rockets are available? 1052 1052 this->mode_ = ROCKET;//Vector-implementation: mode_.push_back(ROCKET); 1053 this->getControllableEntity()->fire(3);//launch rocket 1053 this->getControllableEntity()->fire(3);//launch rocket BUG IS TRIGGERED HERE. 1054 1054 if(this->getControllableEntity()&&this->target_)//after fire(3) getControllableEntity() refers to the rocket! 1055 1055 { … … 1081 1081 for(unsigned int i=0; i<WeaponSystem::MAX_WEAPON_MODES; i++) 1082 1082 { 1083 const std::string wpn = getWeaponname(i, pawn); COUT(0)<<wpn<< std::endl;//Temporary debug info.1083 //const std::string wpn = getWeaponname(i, pawn); COUT(0)<<wpn<< std::endl;//Temporary debug info. 1084 1084 /*if(wpn=="") 1085 1085 weapons[i]=-1; -
code/branches/ai2/src/orxonox/worldentities/ControllableEntity.cc
r8706 r8733 74 74 this->bMouseLook_ = false; 75 75 this->mouseLookSpeed_ = 200; 76 this->bIsRocket_ = false; 76 77 77 78 this->server_position_ = Vector3::ZERO; -
code/branches/ai2/src/orxonox/worldentities/ControllableEntity.h
r8723 r8733 164 164 void setTargetInternal( uint32_t targetID ); 165 165 inline bool getRocket() const 166 { return this-> bIsRocket ; }166 { return this-> bIsRocket_; } 167 167 168 168 protected: … … 183 183 184 184 Ogre::SceneNode* cameraPositionRootNode_; 185 bool bIsRocket ; //Workaround to see, if the controllable entity is a Rocket.185 bool bIsRocket_; //Workaround to see, if the controllable entity is a Rocket. 186 186 187 187 private:
Note: See TracChangeset
for help on using the changeset viewer.