[Orxonox-commit 1594] r6312 - code/branches/presentation2/src/orxonox/controllers
wirthmi at orxonox.net
wirthmi at orxonox.net
Wed Dec 9 23:23:29 CET 2009
Author: wirthmi
Date: 2009-12-09 23:23:29 +0100 (Wed, 09 Dec 2009)
New Revision: 6312
Modified:
code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
Log:
Fixes for damage overlay
Modified: code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc 2009-12-09 22:17:14 UTC (rev 6311)
+++ code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc 2009-12-09 22:23:29 UTC (rev 6312)
@@ -297,7 +297,7 @@
}
void NewHumanController::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) {
- if ( showDamageOverlay_ ) {
+ if ( this->showDamageOverlay_ && !this->controlPaused_ && this->controllableEntity_ && !this->controllableEntity_->isInMouseLook() ) {
Vector3 posA;
if ( originator )
posA = originator->getWorldPosition();
@@ -330,14 +330,14 @@
}
if ( relativeHit.y > threshold) //Top
{
- this->damageOverlayTop_->show();
- this->damageOverlayTT_ = this->damageOverlayTime_;
+ this->damageOverlayBottom_->show();
+ this->damageOverlayTB_ = this->damageOverlayTime_;
//this->damageOverlayTop_->setBackgroundAlpha(0.3);
}
if ( relativeHit.y < -threshold) //Bottom
{
- this->damageOverlayBottom_->show();
- this->damageOverlayTB_ = this->damageOverlayTime_;
+ this->damageOverlayTop_->show();
+ this->damageOverlayTT_ = this->damageOverlayTime_;
//this->damageOverlayBottom_->setBackgroundAlpha(0.3);
}
More information about the Orxonox-commit
mailing list