diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index e84b793e1d0..c0e58942cfc 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -387,6 +387,7 @@ This function restores all organs. dmgIcon.pixel_y = (!lying) ? rand(-11,9) : rand(-10,1) flick_overlay(dmgIcon, attack_bubble_recipients, 9) + receive_damage() if(BURN) damageoverlaytemp = 20 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a4948ad7c61..1c212355af8 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -938,6 +938,16 @@ // And animate the attack! animate(I, alpha = 175, pixel_x = 0, pixel_y = 0, pixel_z = 0, time = 3) +/atom/movable/proc/receive_damage(atom/A) + var/pixel_x_diff = rand(-3,3) + var/pixel_y_diff = rand(-3,3) + animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2) + animate(pixel_x = initial(pixel_x), pixel_y = initial(pixel_y), time = 2) + +/mob/living/receive_damage(atom/A) + ..() + floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement. + /mob/living/proc/do_jitter_animation(jitteriness) var/amplitude = min(4, (jitteriness/100) + 1) var/pixel_x_diff = rand(-amplitude, amplitude)