From 9d9061180d6a2691e81a24ea77f9debd7a7d6e04 Mon Sep 17 00:00:00 2001 From: Ravensdale Date: Sat, 22 Dec 2012 14:46:20 -0800 Subject: [PATCH 1/2] Port of z-level explosion sound effect from pre-merge. Tested and confirmed working with c-4, welding tanks, meteors and roro explosions, probably more! --- code/game/objects/explosion.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index e2975ad9d46..7b7b56801b3 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -20,7 +20,16 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) ) playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) ) - + + var/close = range(world.view+round(devastation_range,1), epicenter) + // to all distanced mobs play a different sound + for(var/mob/M in world) if(M.z == epicenter.z) if(!(M in close)) + // check if the mob can hear + if(M.ear_deaf <= 0 || !M.ear_deaf) if(!istype(M.loc,/turf/space)) + M << 'explosionfar.ogg' + if (adminlog) + message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] (Jump)", admin_ref = 1) + log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ") var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit lighting_controller.processing = 0 From 6a359474cccb86011bf9e4675b6ad9c2a0d5ec27 Mon Sep 17 00:00:00 2001 From: Ravensdale Date: Sat, 22 Dec 2012 14:58:01 -0800 Subject: [PATCH 2/2] Update code/game/objects/explosion.dm Removing a repeat if statement --- code/game/objects/explosion.dm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index 7b7b56801b3..69a5e416687 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -14,10 +14,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa epicenter = get_turf(epicenter) if(!epicenter) return - if(adminlog) - message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z])") - log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ") - + playsound(epicenter, 'sound/effects/explosionfar.ogg', 100, 1, round(devastation_range*2,1) ) playsound(epicenter, "explosion", 100, 1, round(devastation_range,1) ) @@ -27,8 +24,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa // check if the mob can hear if(M.ear_deaf <= 0 || !M.ear_deaf) if(!istype(M.loc,/turf/space)) M << 'explosionfar.ogg' - if (adminlog) - message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] (Jump)", admin_ref = 1) + if(adminlog) + message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z])") log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ") var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit @@ -83,4 +80,4 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa proc/secondaryexplosion(turf/epicenter, range) for(var/turf/tile in range(range, epicenter)) - tile.ex_act(2) \ No newline at end of file + tile.ex_act(2)