Skip to content

Commit

Permalink
dizzy code mob.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenDarkness55 committed Jul 25, 2023
1 parent 27a7812 commit 0304813
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0304813

Please sign in to comment.