Fix attacked_by being called after handled attacks (#27542)

This commit is contained in:
warriorstar-orion
2024-12-06 08:10:38 -05:00
committed by GitHub
parent 0527e59a7c
commit bb74ba03f7
2 changed files with 5 additions and 2 deletions
+2
View File
@@ -163,6 +163,8 @@
user.do_attack_animation(target)
add_fingerprint(user)
return TRUE
/// The equivalent of the standard version of [/obj/item/proc/attack] but for non mob targets.
/obj/item/proc/attack_obj(obj/attacked_obj, mob/living/user, params)
var/signal_return = SEND_SIGNAL(src, COMSIG_ATTACK_OBJ, attacked_obj, user) | SEND_SIGNAL(user, COMSIG_ATTACK_OBJ_LIVING, attacked_obj)
+3 -2
View File
@@ -25,10 +25,11 @@
SEND_SIGNAL(user, COMSIG_MOB_ITEM_ATTACK, M, user)
. = __attack_core(M, user)
if(!__attack_core(M, user))
return
if(!M.new_attack_chain)
M.attacked_by__legacy__attackchain(src, user, def_zone)
return M.attacked_by__legacy__attackchain(src, user, def_zone)
/**
* Called when `user` attacks us with item `W`.