[Orxonox-commit 5284] r9947 - code/trunk/src/orxonox/worldentities/pawns
landauf at orxonox.net
landauf at orxonox.net
Fri Jan 3 15:03:42 CET 2014
Author: landauf
Date: 2014-01-03 15:03:42 +0100 (Fri, 03 Jan 2014)
New Revision: 9947
Modified:
code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
Log:
bugfix: explosion-sound was always positioned at world-coordinates (0,0,0). now it is positioned where the pawn died
Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.cc 2014-01-03 13:46:02 UTC (rev 9946)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.cc 2014-01-03 14:03:42 UTC (rev 9947)
@@ -328,7 +328,6 @@
this->setHealth(1);
if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_))
{
- explosionSound_->play();
// Set bAlive_ to false and wait for PawnManager to do the destruction
this->bAlive_ = false;
@@ -384,6 +383,8 @@
chunk->setPosition(this->getPosition());
// chunk->setVelocity(this->getVelocity());
+ this->explosionSound_->setPosition(this->getPosition());
+ this->explosionSound_->play();
}
void Pawn::deatheffect()
{
More information about the Orxonox-commit
mailing list