Changeset 8891 for code/trunk/src/orxonox/worldentities/pawns
- Timestamp:
- Oct 12, 2011, 7:50:43 PM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
r8855 r8891 93 93 94 94 this->isHumanShip_ = this->hasLocalController(); 95 95 96 96 this->setSyncMode(ObjectDirection::Bidirectional); // needed to synchronise e.g. aimposition 97 97 } … … 450 450 this->isHumanShip_ = true; 451 451 } 452 453 void Pawn::changedActivity(void) 454 { 455 SUPER(Pawn, changedActivity); 456 457 this->setRadarVisibility(this->isActive()); 458 } 459 460 void Pawn::changedVisibility(void) 461 { 462 SUPER(Pawn, changedVisibility); 463 //this->setVisible(this->isVisible()); 464 this->setRadarVisibility(this->isVisible()); 465 } 466 452 467 } -
code/trunk/src/orxonox/worldentities/pawns/Pawn.h
r8855 r8891 170 170 virtual const Vector3& getCarrierPosition(void) const 171 171 { return this->getWorldPosition(); }; 172 virtual void changedActivity(void); //!< To enable radarviewability when the activity is changed 173 virtual void changedVisibility(void); //!< To enable proper radarviewability when the visibility is changed 172 174 173 175 protected: … … 195 197 float maxHealth_; 196 198 float initialHealth_; 197 199 198 200 float shieldHealth_; 199 201 float maxShieldHealth_; -
code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
r8858 r8891 298 298 } 299 299 300 /**301 @brief302 Add an Engine to the SpaceShip.303 @param engine304 A pointer to the Engine to be added.305 */306 300 void SpaceShip::addEngine(orxonox::Engine* engine) 307 301 { … … 504 498 void SpaceShip::resetCamera() 505 499 { 506 Camera *camera = this->getCamera(); 507 if (camera == 0) 508 { 509 orxout(internal_warning) << "Failed to reset camera!" << endl; 510 return; 511 } 512 513 this->shakeDt_ = 0.0f; 514 camera->setPosition(this->cameraOriginalPosition_); 515 camera->setOrientation(this->cameraOriginalOrientation_); 500 if(this->hasLocalController() && this->hasHumanController()) 501 { 502 Camera *camera = this->getCamera(); 503 if (camera == 0) 504 { 505 orxout(internal_warning) << "Failed to reset camera!" << endl; 506 return; 507 } 508 this->shakeDt_ = 0.0f; 509 camera->setPosition(this->cameraOriginalPosition_); 510 camera->setOrientation(this->cameraOriginalOrientation_); 511 } 516 512 } 517 513
Note: See TracChangeset
for help on using the changeset viewer.