From 82de989e5abd9a82889b910fe6d001e4af06e129 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sat, 18 Apr 2015 06:49:59 -0400 Subject: [PATCH 1/2] Removes Hitblips --- .../mob/living/carbon/human/human_damage.dm | 11 ----------- icons/mob/hit_blips.dmi | Bin 520 -> 0 bytes 2 files changed, 11 deletions(-) delete mode 100644 icons/mob/hit_blips.dmi diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index a865ffb63f5..95aeb8663d0 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -310,17 +310,6 @@ This function restores all organs. damage = damage*species.brute_mod if(organ.take_damage(damage, 0, sharp, edge, used_weapon)) UpdateDamageIcon() - var/list/attack_bubble_recipients = list() - var/mob/living/user - for(var/mob/O in viewers(user, src)) - if (O.client && !( O.blinded )) - attack_bubble_recipients.Add(O.client) - spawn(0) - var/image/dmgIcon = image('icons/mob/hit_blips.dmi', src, "dmg[rand(1,2)]",MOB_LAYER+1) - dmgIcon.pixel_x = (!lying) ? rand(-3,3) : rand(-11,12) - dmgIcon.pixel_y = (!lying) ? rand(-11,9) : rand(-10,1) - //world << "x: [dmgIcon.pixel_x] AND y: [dmgIcon.pixel_y]" - flick_overlay(dmgIcon, attack_bubble_recipients, 9) if(BURN) damageoverlaytemp = 20 if(species && species.burn_mod) diff --git a/icons/mob/hit_blips.dmi b/icons/mob/hit_blips.dmi deleted file mode 100644 index 53ec7b3fd074180e4cc9b6e19e032d410542da09..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 520 zcmV+j0{8uiP)ItnE)Eh01cQfF24W`ng<7q4GqA+!0hEsdjJ3c0d!JMQvg8b*k%9#0DyW_ zSad{Xb7OL8aCB*JZU6vyoKseCa&`CgQ*iP1_dEGYCD#~5X(bCQ#a_6g zOgdmZoh{lO7UjIZfd&$G68_Tl-2gJ#8XfB+$ZR=sL#X784SS*8Xfr4lT{S-4;brz6hV}O_&Qd`G~)TlRNwecjp&+Oyi%W{1j)g1s}M~UNiXs0000< KMNUMnLSTZyB+~!@ From f48ff52bf26fc837995cca6b1f299b78a3228238 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Mon, 20 Apr 2015 19:06:21 -0400 Subject: [PATCH 2/2] Twitch --- code/modules/mob/living/carbon/human/human_damage.dm | 1 + code/modules/mob/living/living.dm | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 95aeb8663d0..9bdd895a14a 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -310,6 +310,7 @@ This function restores all organs. damage = damage*species.brute_mod if(organ.take_damage(damage, 0, sharp, edge, used_weapon)) UpdateDamageIcon() + receive_damage() if(BURN) damageoverlaytemp = 20 if(species && species.burn_mod) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 2901ae318aa..a19ee6e5207 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -808,6 +808,17 @@ ..() floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure we restart the bouncing after the next movement. + +/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)