summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-19 23:15:45 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-20 19:46:11 +0100
commit64cec0656a7df985304b45b83c380911af44c726 (patch)
tree50227c17d6846f9214f1d30c250dc8df9fe4bee5 /src/being.cpp
parentdb8df518c05d38c3d7452fe8f18fdc7c48c3eb4e (diff)
downloadmana-64cec0656a7df985304b45b83c380911af44c726.tar.gz
mana-64cec0656a7df985304b45b83c380911af44c726.tar.bz2
mana-64cec0656a7df985304b45b83c380911af44c726.tar.xz
mana-64cec0656a7df985304b45b83c380911af44c726.zip
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
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp2
1 files changed, 1 insertions, 1 deletions
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
{