--- deliantra/server/socket/sounds.C 2006/08/13 17:16:06 1.1 +++ deliantra/server/socket/sounds.C 2006/08/29 08:01:38 1.2 @@ -1,6 +1,6 @@ /* * static char *rcsid_sound_c = - * "$Id: sounds.C,v 1.1 2006/08/13 17:16:06 elmex Exp $"; + * "$Id: sounds.C,v 1.2 2006/08/29 08:01:38 root Exp $"; */ /* Send bug reports to Raphael Quinet (quinet@montefiore.ulg.ac.be) */ @@ -34,8 +34,8 @@ if (!pl->socket.sound) return; /* Do some quick conversion to the sound type we want. */ if (soundnum>=SOUND_CAST_SPELL_0) { - soundtype=SOUND_SPELL; - soundnum -=SOUND_CAST_SPELL_0; + soundtype=SOUND_SPELL; + soundnum -=SOUND_CAST_SPELL_0; } else soundtype=SOUND_NORMAL; @@ -58,17 +58,17 @@ player *pl; if (sound_num >= NROF_SOUNDS) { - LOG(llevError,"Tried to play an invalid sound num: %d\n", sound_num); - return; + LOG(llevError,"Tried to play an invalid sound num: %d\n", sound_num); + return; } for (pl = first_player; pl; pl = pl->next) { - if (pl->ob->map == map) { - int distance=isqrt(POW2(pl->ob->x - x) + POW2(pl->ob->y - y)); + if (pl->ob->map == map) { + int distance=isqrt(POW2(pl->ob->x - x) + POW2(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 )); - } - } + if (distance<=MAX_SOUND_DISTANCE) { + play_sound_player_only(pl, sound_num, ( sint8 )( x-pl->ob->x ), ( sint8 )( y-pl->ob->y )); + } + } } }