From 88bc037b7b3f40a22b24501f05f2d67cf418e5b1 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Thu, 29 Aug 2024 05:16:36 +0300 Subject: [PATCH] Projectiles no longer always play turf hit sound (#86095) ## About The Pull Request Closes #86085 ## Changelog :cl: fix: Projectiles no longer always play turf hit sound /:cl: --- code/modules/projectiles/projectile.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index fd6f145eaba..2f3b2c48236 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -296,7 +296,7 @@ hitx = target.pixel_x + rand(-8, 8) hity = target.pixel_y + rand(-8, 8) - if(isturf(target_turf) && hitsound_wall) + if(isturf(target) && hitsound_wall) var/volume = clamp(vol_by_damage() + 20, 0, 100) if(suppressed) volume = 5 @@ -1048,7 +1048,7 @@ var/tx = (text2num(screen_loc_X[1]) - 1) * world.icon_size + text2num(screen_loc_X[2]) // We are here trying to lower our target location by the firing source's visual offset - // So visually things make a nice straight line while properly accounting for actual physical position + // So visually things make a nice straight line while properly accounting for actual physical position var/ty = (text2num(screen_loc_Y[1]) - 1) * world.icon_size + text2num(screen_loc_Y[2]) - source.pixel_z //Calculate the "resolution" of screen based on client's view and world's icon size. This will work if the user can view more tiles than average.