Changeset 8741 for code/branches
- Timestamp:
- Jul 10, 2011, 9:53:17 PM (13 years ago)
- Location:
- code/branches/ai2/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai2/src/orxonox/controllers/ArtificialController.h
r8736 r8741 142 142 143 143 static bool sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype); // hack 144 void boostControl(); 144 void boostControl(); //<! Sets and resets the boost parameter of the spaceship. Bots alternate between boosting and saving boost. 145 145 146 146 bool bHasTargetPosition_; … … 149 149 bool bShooting_; 150 150 151 int numberOfWeapons; //< Used for weapon init function. Displayes number of weapons available for a bot.151 int numberOfWeapons; //<! Used for weapon init function. Displayes number of weapons available for a bot. 152 152 bool weapons[WeaponSystem::MAX_WEAPON_MODES]; //<! Displays if a weapon is available - managed by setupWeapons() 153 int projectiles[WeaponSystem::MAX_WEAPON_MODES]; //<! Displays amount of projectiles . - managed by setupWeapons()154 float botlevel_; //< Makes the level of a bot configurable.155 float timeout_; //< Timeout for rocket usage. (If a rocket misses, a bot should stop using it.)153 int projectiles[WeaponSystem::MAX_WEAPON_MODES]; //<! Displays amount of projectiles of each weapon. - managed by setupWeapons() 154 float botlevel_; //<! Makes the level of a bot configurable. 155 float timeout_; //<! Timeout for rocket usage. (If a rocket misses, a bot should stop using it.) 156 156 157 157 enum Mode {DEFAULT, ROCKET, DEFENCE, MOVING};//TODO; implement DEFENCE, MOVING modes -
code/branches/ai2/src/orxonox/worldentities/pawns/SpaceShip.cc
r8706 r8741 326 326 void SpaceShip::resetCamera() 327 327 { 328 Camera *camera = this->getCamera(); 329 330 if (camera == 0) 331 { 332 COUT(2) << "Failed to reset camera!"; 333 return; 334 } 335 336 this->shakeDt_ = 0; 337 camera->setPosition(this->cameraOriginalPosition_); 338 camera->setOrientation(this->cameraOriginalOrientation_); 328 if(this->hasLocalController() && this->hasHumanController()) 329 { 330 Camera *camera = this->getCamera(); 331 332 if (camera == 0) 333 { 334 COUT(2) << "Failed to reset camera!"; 335 return; 336 } 337 338 this->shakeDt_ = 0; 339 camera->setPosition(this->cameraOriginalPosition_); 340 camera->setOrientation(this->cameraOriginalOrientation_); 341 } 339 342 } 340 343
Note: See TracChangeset
for help on using the changeset viewer.