diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 9aa1fa36c19a..823acfdabc36 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -190,6 +190,7 @@ //If our damage value for that person exceeds this number then we consider targeting them. if(target_memory[P.firer] > MAX_DAMAGE_SUFFERED) FindTarget(list(P.firer), 1) + DamageEffect(P.damage, P.damage_type) return ..() /mob/living/simple_animal/hostile/Move(atom/newloc, dir , step_x , step_y) @@ -254,20 +255,6 @@ add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/variable_hostile_speed_bonus, TRUE, amount, TRUE) addtimer(CALLBACK(src, TYPE_PROC_REF(/mob, add_or_update_variable_movespeed_modifier), /datum/movespeed_modifier/variable_hostile_speed_bonus, TRUE, -amount, TRUE), time) -/mob/living/simple_animal/hostile/attacked_by(obj/item/I, mob/living/user) - if(stat == CONSCIOUS && !target && AIStatus != AI_OFF && !client && user) - FindTarget(list(user), 1) - return ..() - -/mob/living/simple_animal/hostile/bullet_act(obj/projectile/P) - if(stat == CONSCIOUS && !target && AIStatus != AI_OFF && !client) - if(P.firer && get_dist(src, P.firer) <= aggro_vision_range) - FindTarget(list(P.firer), 1) - Goto(P.starting, move_to_delay, 3) - - . = ..() - DamageEffect(P.damage, P.damage_type) - /*-------------------\ |Damage Visual Effect| \-------------------*/ diff --git a/code/modules/mob/living/simple_animal/hostile/ordeal/green/dawn.dm b/code/modules/mob/living/simple_animal/hostile/ordeal/green/dawn.dm index e49116a01a51..5612174e4985 100644 --- a/code/modules/mob/living/simple_animal/hostile/ordeal/green/dawn.dm +++ b/code/modules/mob/living/simple_animal/hostile/ordeal/green/dawn.dm @@ -47,14 +47,16 @@ return FALSE return ..() -/mob/living/simple_animal/hostile/ordeal/green_bot/AttackingTarget() +/mob/living/simple_animal/hostile/ordeal/green_bot/AttackingTarget(atom/attacked_target) + if(finishing) + return . = ..() if(.) - if(!istype(target, /mob/living/carbon/human)) + if(!istype(attacked_target, /mob/living/carbon/human)) return if(SSmaptype.maptype == "city") return - var/mob/living/carbon/human/TH = target + var/mob/living/carbon/human/TH = attacked_target if(TH.health < 0) finishing = TRUE TH.Stun(4 SECONDS) @@ -103,12 +105,14 @@ melee_damage_lower = 14 melee_damage_upper = 16 -/mob/living/simple_animal/hostile/ordeal/green_bot/syringe/AttackingTarget() +/mob/living/simple_animal/hostile/ordeal/green_bot/syringe/AttackingTarget(atom/attacked_target) + if(finishing) + return . = ..() if(.) - if(!istype(target, /mob/living/carbon/human)) + if(!istype(attacked_target, /mob/living/carbon/human)) return - var/mob/living/carbon/human/H = target + var/mob/living/carbon/human/H = attacked_target H.add_movespeed_modifier(/datum/movespeed_modifier/grab_slowdown/aggressive) addtimer(CALLBACK(H, TYPE_PROC_REF(/mob, remove_movespeed_modifier), /datum/movespeed_modifier/grab_slowdown/aggressive), 4 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE) diff --git a/code/modules/mob/living/simple_animal/hostile/ordeal/indigo/dawn.dm b/code/modules/mob/living/simple_animal/hostile/ordeal/indigo/dawn.dm index eb8de9216309..daf62ed82e3c 100644 --- a/code/modules/mob/living/simple_animal/hostile/ordeal/indigo/dawn.dm +++ b/code/modules/mob/living/simple_animal/hostile/ordeal/indigo/dawn.dm @@ -23,10 +23,10 @@ blood_volume = BLOOD_VOLUME_NORMAL silk_results = list(/obj/item/stack/sheet/silk/indigo_simple = 1) -/mob/living/simple_animal/hostile/ordeal/indigo_dawn/AttackingTarget() +/mob/living/simple_animal/hostile/ordeal/indigo_dawn/AttackingTarget(atom/attacked_target) . = ..() - if(. && isliving(target)) - var/mob/living/L = target + if(. && isliving(attacked_target)) + var/mob/living/L = attacked_target if(L.stat != DEAD) if(L.health <= HEALTH_THRESHOLD_DEAD && HAS_TRAIT(L, TRAIT_NODEATH)) devour(L)