Changeset - r8604:bb0778079c1c
[Not reviewed]
master
0 1 0
smatz - 17 years ago 2008-02-19 17:45:30
smatz@openttd.org
(svn r12186) -Fix [FS#1784](r12169): assert when trying to play tile sound at NW border of map (placing buyos, leveling land)
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/sound.cpp
Show inline comments
 
@@ -241,7 +241,8 @@ void SndPlayTileFx(SoundFx sound, TileIn
 
	/* 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));
 
	uint z = (y < 0 ? 0 : GetSlopeZ(x, y));
 
	Point pt = RemapCoords(x, y, z);
 
	y += 2 * TILE_SIZE;
 
	Point pt2 = RemapCoords(x, y, GetSlopeZ(x, y));
 
	SndPlayScreenCoordFx(sound, pt.x, pt2.x, pt.y, pt2.y);
0 comments (0 inline, 0 general)