summaryrefslogtreecommitdiff
path: root/sound.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-04-23 19:35:36 +0000
committertron <tron@openttd.org>2006-04-23 19:35:36 +0000
commitc1dc517dab10acb049f35e80f94508bbcecf3193 (patch)
tree020949ed699a5b1e636d9d4da8e68db3751bf261 /sound.c
parent8ef2c13c65498dfc39cb80bd1c07589b747fe1e6 (diff)
downloadopenttd-c1dc517dab10acb049f35e80f94508bbcecf3193.tar.xz
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
Diffstat (limited to 'sound.c')
-rw-r--r--sound.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound.c b/sound.c
index 0c63825e2..30898cdaf 100644
--- a/sound.c
+++ b/sound.c
@@ -207,9 +207,9 @@ static void SndPlayScreenCoordFx(SoundFx sound, int x, int y)
void SndPlayTileFx(SoundFx sound, TileIndex tile)
{
- /* emits sound from center (+ 8) of the tile */
- int x = TileX(tile) * TILE_SIZE + 8;
- int y = TileY(tile) * TILE_SIZE + 8;
+ /* emits sound from center of the tile */
+ int x = TileX(tile) * TILE_SIZE + TILE_SIZE / 2;
+ int y = TileY(tile) * TILE_SIZE + TILE_SIZE / 2;
Point pt = RemapCoords(x, y, GetSlopeZ(x, y));
SndPlayScreenCoordFx(sound, pt.x, pt.y);
}