From 6272ea3c5c37b9c4160e4429859e169480e94e51 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Fri, 17 Jan 2025 14:03:23 -0700 Subject: [PATCH] [MIRROR] Refactored screen shake effect (#9898) Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com> --- code/modules/mob/mob_defines.dm | 1 - code/modules/mob/mob_helpers.dm | 32 ++++++++++++-------------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 4de36ad6ac..c5efc6ea85 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -115,7 +115,6 @@ var/stunned = 0.0 var/weakened = 0.0 var/losebreath = 0.0//Carbon - var/shakecamera = 0 var/a_intent = I_HELP//Living var/m_int = null//Living var/m_intent = I_RUN//Living diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 19b46a630b..81de85cb8a 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -293,28 +293,20 @@ It's fairly easy to fix if dealing with single letters but not so much with comp /proc/shake_camera(mob/M, duration, strength=1) - if(!M || !M.client || M.shakecamera || M.stat || isEye(M) || isAI(M)) + if(!M || !M.client || duration < 1) return - M.shakecamera = 1 - spawn(1) - if(!M.client) - return - - var/atom/oldeye=M.client.eye - var/aiEyeFlag = 0 - if(istype(oldeye, /mob/observer/eye/aiEye)) - aiEyeFlag = 1 - - var/x - for(x=0; x