From 64cec0656a7df985304b45b83c380911af44c726 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 19 Jan 2012 23:15:45 +0100 Subject: Fixed a bug with hurt sounds volume and simplified code The hurt sound volume was being played based on the distance in tiles, even though Sound::playSfx was expecting pixels. This would cause hurt sounds of other players to play too loud. There were also several conversions between pixel and tile coordinates that could be simplified. Reviewed-by: Yohann Ferreira --- src/being.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/being.cpp') diff --git a/src/being.cpp b/src/being.cpp index 9483e897..2f904d08 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -376,7 +376,7 @@ void Being::takeDamage(Being *attacker, int amount, if (attacker) { sound.playSfx(mInfo->getSound(SOUND_EVENT_HURT), - attacker->getTileX(), attacker->getTileY()); + attacker->getPixelX(), attacker->getPixelY()); } else { -- cgit v1.2.3-70-g09d2