[Orxonox-commit 1598] r6316 - code/branches/presentation2/src/orxonox/controllers
scheusso at orxonox.net
scheusso at orxonox.net
Thu Dec 10 21:48:53 CET 2009
Author: scheusso
Date: 2009-12-10 21:48:53 +0100 (Thu, 10 Dec 2009)
New Revision: 6316
Modified:
code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
Log:
fixed NHC behaviour in rocket mode
Modified: code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc 2009-12-10 19:56:48 UTC (rev 6315)
+++ code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc 2009-12-10 20:48:53 UTC (rev 6316)
@@ -268,6 +268,8 @@
void NewHumanController::doFire(unsigned int firemode)
{
+ if ( !this->controllableEntity_ )
+ return;
//if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) {
/*
@@ -475,10 +477,14 @@
void NewHumanController::changedControllableEntity()
{
+ if( this->getControllableEntity() )
+ CCOUT(0) << "changed controllable entity to: " << this->getControllableEntity()->getIdentifier()->getName() << endl;
+ else
+ CCOUT(0) << "changed controllable entity to: " << this->getControllableEntity() << endl;
this->controlMode_ = 0;
this->currentYaw_ = 0;
this->currentPitch_ = 0;
- if (this->getControllableEntity() && this->getControllableEntity()->getIdentifier()->getName() == "SpaceShip")
+ if (this->getControllableEntity() && ( this->getControllableEntity()->getIdentifier()->getName() == "SpaceShip" || this->getControllableEntity()->getIdentifier()->getName() == "Rocket" ))
{
this->showOverlays_ = true;
if( !this->controlPaused_ )
@@ -519,7 +525,7 @@
void NewHumanController::doPauseControl() {
this->controlPaused_ = true;
-
+ COUT(0) << "pause control" << endl;
this->hideOverlays();
}
More information about the Orxonox-commit
mailing list