ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/sounds.C
(Generate patch)

Comparing deliantra/server/socket/sounds.C (file contents):
Revision 1.10 by root, Thu Dec 21 23:37:06 2006 UTC vs.
Revision 1.11 by root, Sat Dec 23 13:56:25 2006 UTC

53 53
54/** Plays some sound on map at x,y. */ 54/** Plays some sound on map at x,y. */
55void 55void
56play_sound_map (maptile *map, int x, int y, short sound_num) 56play_sound_map (maptile *map, int x, int y, short sound_num)
57{ 57{
58 player *pl;
59
60 if (sound_num >= NROF_SOUNDS) 58 if (sound_num >= NROF_SOUNDS)
61 { 59 {
62 LOG (llevError, "Tried to play an invalid sound num: %d\n", sound_num); 60 LOG (llevError, "Tried to play an invalid sound num: %d\n", sound_num);
63 return; 61 return;
64 } 62 }
65 63
66 for (pl = first_player; pl; pl = pl->next) 64 for_all_players (pl)
67 { 65 {
68 if (pl->ob->map == map) 66 if (pl->ob->map == map)
69 { 67 {
70 int distance = isqrt (POW2 (pl->ob->x - x) + POW2 (pl->ob->y - y)); 68 int distance = isqrt (POW2 (pl->ob->x - x) + POW2 (pl->ob->y - y));
71 69

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines