Fixes facehugger exploit (#70166)

This commit is contained in:
ShizCalev
2022-09-29 14:17:53 -07:00
committed by GitHub
parent 839b7a4c14
commit dab1cfe277
3 changed files with 11 additions and 0 deletions
@@ -41,6 +41,8 @@
AddElement(/datum/element/connect_loc, loc_connections)
AddElement(/datum/element/atmos_sensitive, mapload)
RegisterSignal(src, COMSIG_LIVING_TRYING_TO_PULL, .proc/react_to_mob)
/obj/item/clothing/mask/facehugger/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
..()
if(atom_integrity < 90)
@@ -49,6 +51,12 @@
/obj/item/clothing/mask/facehugger/attackby(obj/item/O, mob/user, params)
return O.attack_atom(src, user, params)
/obj/item/clothing/mask/facehugger/proc/react_to_mob(datum/source, mob/user)
SIGNAL_HANDLER
if((stat == CONSCIOUS && !sterile) && !isalien(user))
if(Leap(user))
return COMSIG_LIVING_CANCEL_PULL
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/clothing/mask/facehugger/attack_hand(mob/user, list/modifiers)
if((stat == CONSCIOUS && !sterile) && !isalien(user))
+2
View File
@@ -279,6 +279,8 @@
return FALSE
if(SEND_SIGNAL(src, COMSIG_LIVING_TRY_PULL, AM, force) & COMSIG_LIVING_CANCEL_PULL)
return FALSE
if(SEND_SIGNAL(AM, COMSIG_LIVING_TRYING_TO_PULL, src, force) & COMSIG_LIVING_CANCEL_PULL)
return FALSE
AM.add_fingerprint(src)