--- deliantra/server/socket/sounds.C 2006/12/23 13:56:25 1.11 +++ deliantra/server/socket/sounds.C 2007/01/15 01:39:42 1.12 @@ -49,8 +49,6 @@ pl->ns->send_packet (sl); } -#define POW2(x) ((x) * (x)) - /** Plays some sound on map at x,y. */ void play_sound_map (maptile *map, int x, int y, short sound_num) @@ -65,12 +63,10 @@ { if (pl->ob->map == map) { - int distance = isqrt (POW2 (pl->ob->x - x) + POW2 (pl->ob->y - y)); + int distance = idistance (pl->ob->x - x, pl->ob->y - y); if (distance <= MAX_SOUND_DISTANCE) - { - play_sound_player_only (pl, sound_num, (sint8) (x - pl->ob->x), (sint8) (y - pl->ob->y)); - } + play_sound_player_only (pl, sound_num, x - pl->ob->x, y - pl->ob->y); } } }