From 030481389f0907295fda2d1aaa754a973f848a33 Mon Sep 17 00:00:00 2001 From: GoldenDarkness55 <103884785+GoldenDarkness55@users.noreply.github.com> Date: Tue, 25 Jul 2023 12:33:47 +0200 Subject: [PATCH] dizzy code mob.dm --- code/modules/mob/mob.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c9921745177d..f21329e31230 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -609,14 +609,15 @@ note dizziness decrements automatically in the mob's Life() proc. is_dizzy = 1 while(dizziness > 100) if(client) + if(buckled || resting) + client.pixel_x = 0 + client.pixel_y = 0 + else var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70 client.pixel_x = amplitude * sin(0.008 * dizziness * world.time) client.pixel_y = amplitude * cos(0.008 * dizziness * world.time) - if(!buckled && !resting && prob(1)) + if(prob(1)) to_chat(src, "The dizziness is becoming unbearable! It should pass faster if you lie down.") - if(buckled || resting) - client.pixel_x = 0 - client.pixel_y = 0 sleep(1) //endwhile - reset the pixel offsets to zero is_dizzy = 0