… | |
… | |
1620 | { |
1620 | { |
1621 | if (!sound) |
1621 | if (!sound) |
1622 | return; |
1622 | return; |
1623 | |
1623 | |
1624 | for_all_players (pl) |
1624 | for_all_players (pl) |
1625 | if (pl->observe->map == this) |
1625 | if (pl->ob->map == this) |
1626 | if (client *ns = pl->ns) |
1626 | if (client *ns = pl->ns) |
1627 | { |
1627 | { |
1628 | int dx = x - pl->observe->x; |
1628 | int dx = x - pl->ob->x; |
1629 | int dy = y - pl->observe->y; |
1629 | int dy = y - pl->ob->y; |
1630 | |
1630 | |
1631 | int distance = idistance (dx, dy); |
1631 | int distance = idistance (dx, dy); |
1632 | |
1632 | |
1633 | if (distance <= MAX_SOUND_DISTANCE) |
1633 | if (distance <= MAX_SOUND_DISTANCE) |
1634 | ns->play_sound (sound, dx, dy); |
1634 | ns->play_sound (sound, dx, dy); |