Attacking yourself always hits the zone you're targeting (#2131)
This commit is contained in:
committed by
kevinz000
parent
31a463875b
commit
d26fe6c877
@@ -68,7 +68,11 @@
|
||||
|
||||
|
||||
/mob/living/carbon/attacked_by(obj/item/I, mob/living/user)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(user.zone_selected))
|
||||
var/obj/item/bodypart/affecting
|
||||
if(user == src)
|
||||
affecting = get_bodypart(check_zone(user.zone_selected)) //we're self-mutilating! yay!
|
||||
else
|
||||
affecting = get_bodypart(ran_zone(user.zone_selected))
|
||||
if(!affecting) //missing limb? we select the first bodypart (you can never have zero, because of chest)
|
||||
affecting = bodyparts[1]
|
||||
send_item_attack_message(I, user, affecting.name)
|
||||
|
||||
@@ -156,8 +156,13 @@
|
||||
if(!I || !user)
|
||||
return 0
|
||||
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(user.zone_selected)) //what we're actually ending up trying to hit.
|
||||
var/obj/item/bodypart/affecting
|
||||
if(user == src)
|
||||
affecting = get_bodypart(check_zone(user.zone_selected)) //stabbing yourself always hits the right target
|
||||
else
|
||||
affecting = get_bodypart(ran_zone(user.zone_selected))
|
||||
var/target_area = parse_zone(check_zone(user.zone_selected)) //our intended target
|
||||
|
||||
SSblackbox.add_details("item_used_for_combat","[I.type]|[I.force]")
|
||||
SSblackbox.add_details("zone_targeted","[target_area]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user