Adds "surround" arg to playsound, which enables 3D sound

Defaulted to on
Also changes the toy nuke to use it

Conflicts:
	code/game/sound.dm
This commit is contained in:
JJRcop
2014-01-07 17:45:12 -05:00
committed by ZomgPonies
parent 7b678241e4
commit 24e29deeaf
2 changed files with 21 additions and 21 deletions
+7 -8
View File
@@ -544,14 +544,13 @@
/obj/item/toy/nuke/attack_self(mob/user)
if (cooldown < world.time)
cooldown = world.time + 3000 //5 minutes
user.visible_message("<span class='warning'>[user] presses a button on [src]</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='notice'>You hear the click of a button.</span>")
sleep(5)
icon_state = "nuketoy"
for (var/mob/M in hearers(world.view, user)) //I'm doing this because playsound's dampening/stereo ruins the effect
if (M.client && !M.ear_deaf)
M << 'sound/machines/Alarm.ogg'
sleep(135)
icon_state = "nuketoyidle"
spawn() //gia said so
user.visible_message("<span class='warning'>[user] presses a button on [src]</span>", "<span class='notice'>You activate [src], it plays a loud noise!</span>", "<span class='notice'>You hear the click of a button.</span>")
sleep(5)
icon_state = "nuketoy"
playsound(src, 'sound/machines/Alarm.ogg', 100, 0, surround = 0)
sleep(135)
icon_state = "nuketoyidle"
/obj/item/weapon/toddler
icon_state = "toddler"