… | |
… | |
1599 | |
1599 | |
1600 | for_all_players (pl) |
1600 | for_all_players (pl) |
1601 | if (pl->observe->map == this) |
1601 | if (pl->observe->map == this) |
1602 | if (client *ns = pl->ns) |
1602 | if (client *ns = pl->ns) |
1603 | { |
1603 | { |
1604 | int dx = x - pl->ob->x; |
1604 | int dx = x - pl->observe->x; |
1605 | int dy = y - pl->ob->y; |
1605 | int dy = y - pl->observe->y; |
1606 | |
1606 | |
1607 | int distance = idistance (dx, dy); |
1607 | int distance = idistance (dx, dy); |
1608 | |
1608 | |
1609 | if (distance <= MAX_SOUND_DISTANCE) |
1609 | if (distance <= MAX_SOUND_DISTANCE) |
1610 | ns->play_sound (sound, dx, dy); |
1610 | ns->play_sound (sound, dx, dy); |