mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
[MIRROR] Attempted fix at dismemberment runtime (#884)
* Fixes a dismemberment runtime (#53695) Bunch of undocumented procs relating to wounds. can_dismember is being called on the head from send_item_attack_message after the head is dismembered. At that point is has no owner and we get ourselves a bit of juicy runtime. I suspect it's an order-of-operations issue. The wording of the text messages in send_item_attack_message seem to indicate that it's warning about the attack that is just about to happen. In /mob/living/attacked_by() the very first thing it does is call send_item_attack_message(), before apply_damage. As such, I've made sure send_item_attack_message() is called before apply_damage in this instance too. * Attempted fix at dismemberment runtime Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
@@ -1426,10 +1426,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
Iwound_bonus = CANT_WOUND
|
||||
|
||||
var/weakness = H.check_weakness(I, user)
|
||||
apply_damage(I.force * weakness, I.damtype, def_zone, armor_block, H, wound_bonus = Iwound_bonus, bare_wound_bonus = I.bare_wound_bonus, sharpness = I.get_sharpness())
|
||||
|
||||
H.send_item_attack_message(I, user, hit_area, affecting)
|
||||
|
||||
apply_damage(I.force * weakness, I.damtype, def_zone, armor_block, H, wound_bonus = Iwound_bonus, bare_wound_bonus = I.bare_wound_bonus, sharpness = I.get_sharpness())
|
||||
|
||||
if(!I.force)
|
||||
return FALSE //item force is zero
|
||||
|
||||
|
||||
Reference in New Issue
Block a user