Skip to content

Commit

Permalink
[S] fixes a headslug exploit (ParadiseSS13#24300)
Browse files Browse the repository at this point in the history
* fixes headslugs being able to double up on the dead

* Update code/modules/mob/living/simple_animal/hostile/headslug.dm

Co-authored-by: Contrabang <[email protected]>

---------

Co-authored-by: Contrabang <[email protected]>
  • Loading branch information
GDNgit and Contrabang authored Feb 24, 2024
1 parent 9892dd9 commit 5c2f317
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 9 additions & 4 deletions code/modules/mob/living/simple_animal/hostile/headslug.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
if(HAS_TRAIT(carbon_target, TRAIT_XENO_HOST))
to_chat(src, "<span class='userdanger'>A foreign presence repels us from this body. Perhaps we should try to infest another?</span>")
return
if(!carbon_target.get_int_organ_datum(ORGAN_DATUM_HEART))
to_chat(src, "<span class='userdanger'>There's no heart for us to infest!</span>")
return
Infect(carbon_target)
to_chat(src, "<span class='userdanger'>With our egg laid, our death approaches rapidly...</span>")
addtimer(CALLBACK(src, PROC_REF(death)), 25 SECONDS)
Expand Down Expand Up @@ -114,11 +117,13 @@
owner.gib()
return

owner.apply_damage(300, BRUTE, BODY_ZONE_CHEST)
owner.bleed(BLOOD_VOLUME_NORMAL)
var/obj/item/organ/external/chest = owner.get_organ(BODY_ZONE_CHEST)
chest.fracture()
chest.disembowel()
var/datum/organ/our_heart_datum = owner.get_int_organ_datum(ORGAN_DATUM_HEART)
var/obj/item/organ/internal/our_heart = our_heart_datum.linked_organ
var/obj/item/organ/external/heart_location = owner.get_organ(our_heart.parent_organ)
owner.apply_damage(300, BRUTE, our_heart.parent_organ)
heart_location.fracture()
heart_location.disembowel(our_heart.parent_organ)

#undef EGG_INCUBATION_DEAD_CYCLE
#undef EGG_INCUBATION_LIVING_CYCLE
2 changes: 0 additions & 2 deletions code/modules/surgery/organs/organ_external.dm
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,6 @@ Note that amputating the affected organ does in fact remove the infection from t
if(disembowel("groin"))
return TRUE



/obj/item/organ/external/attackby(obj/item/I, mob/user, params)
if(I.sharp)
add_fingerprint(user)
Expand Down

0 comments on commit 5c2f317

Please sign in to comment.