Baystation12/Baystation12 — pull request #4644 by Glloyd (2014-03-27 20:24:59+00:00)
Title: 3d Sound from /tg/

What it says on the tin, credits go to Giacom from /tg/, I just ported it. It's been tested with 20+ players on a BS12 server, and works fine. Full notes are below:

3D sounds! All sounds, which use playsound(), are now 3D. Meaning if you are further away from a source of noise, it will sound quieter and if the source is left of you, you'll hear it more to your left stereo speaker.
Changed playsound() to use less code. Playsound now loops through the player list, which means you do not have to check inside closets/objects/other mobs to play sounds.

The piano now uses 3D sounds.

Explosions that are close to you play the usual sound.
Explosions which are far away will play explosionfar.ogg, but with volume changed depending on the distance.
Max cap (3, 7, 14) bombs will play explosionfar.ogg for half of the station (115 tiles).
A small bomb's sound radius will be much less than max cap bombs, and be quieter (so you can tell the difference).