diff --git a/code/modules/mob/living/basic/basic.dm b/code/modules/mob/living/basic/basic.dm index b73bd672512..207db6815b6 100644 --- a/code/modules/mob/living/basic/basic.dm +++ b/code/modules/mob/living/basic/basic.dm @@ -220,12 +220,14 @@ return FALSE var/result = target.attack_basic_mob(src, modifiers) SEND_SIGNAL(src, COMSIG_HOSTILE_POST_ATTACKINGTARGET, target, result) + if(!ignore_cooldown) + changeNext_move(melee_attack_cooldown) // Set it again because objects like to fuck with it in attack_basic_mob return result /mob/living/basic/proc/early_melee_attack(atom/target, list/modifiers, ignore_cooldown = FALSE) face_atom(target) if(!ignore_cooldown) - changeNext_move(melee_attack_cooldown) + changeNext_move(melee_attack_cooldown) // Set cooldown early in case it is cancelled if(SEND_SIGNAL(src, COMSIG_HOSTILE_PRE_ATTACKINGTARGET, target, Adjacent(target), modifiers) & COMPONENT_HOSTILE_NO_ATTACK) return FALSE //but more importantly return before attack_animal called return TRUE diff --git a/code/modules/mob/living/basic/guardian/guardian_types/standard.dm b/code/modules/mob/living/basic/guardian/guardian_types/standard.dm index c9a4a6fcdff..9b4335898cf 100644 --- a/code/modules/mob/living/basic/guardian/guardian_types/standard.dm +++ b/code/modules/mob/living/basic/guardian/guardian_types/standard.dm @@ -23,17 +23,19 @@ /mob/living/basic/guardian/standard/do_attack_animation(atom/attacked_atom, visual_effect_icon, used_item, no_effect) . = ..() - if (!isliving(attacked_atom) || !isclosedturf(attacked_atom)) + if (!isliving(attacked_atom) && !isclosedturf(attacked_atom)) return var/msg = "" for(var/i in 1 to 9) msg += battlecry say("[msg]!!", ignore_spam = TRUE) for(var/sounds in 1 to 4) - addtimer(CALLBACK(src, PROC_REF(do_attack_sound), attacked_atom.loc), sounds DECISECONDS, TIMER_DELETE_ME) + addtimer(CALLBACK(src, PROC_REF(do_attack_sound), attacked_atom), sounds DECISECONDS, TIMER_DELETE_ME) /// Echo our punching sounds /mob/living/basic/guardian/standard/proc/do_attack_sound(atom/playing_from) + if (QDELETED(playing_from)) + return playsound(playing_from, attack_sound, 50, TRUE, TRUE) /// Action to change our battlecry