From d360787aa6899129f1c6c93bd3da1ef29830d763 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Sat, 21 Jul 2018 21:56:10 -0400 Subject: [PATCH 1/2] Fixes Monkey Gibbing Exploit --- code/game/dna/genes/monkey.dm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index 38caf8eda74..7df6ebcf3c1 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -22,21 +22,23 @@ H.regenerate_icons() H.SetStunned(1) H.canmove = 0 + var/has_primitive_form = H.dna.species.primitive_form // cache this + if(has_primitive_form) + H.set_species(has_primitive_form) H.icon = null H.invisibility = 101 + new /obj/effect/temp_visual/monkeyify(H.loc) sleep(22) H.SetStunned(0) H.invisibility = initial(H.invisibility) - if(!H.dna.species.primitive_form) //If the creature in question has no primitive set, this is going to be messy. + if(!has_primitive_form) //If the creature in question has no primitive set, this is going to be messy. H.gib() return - H.set_species(H.dna.species.primitive_form) - QDEL_NULL(H.hud_used) if(H.client) @@ -50,6 +52,8 @@ /datum/dna/gene/monkey/deactivate(mob/living/carbon/human/H, connected, flags) if(!istype(H)) return + if(!issmall(H)) + return for(var/obj/item/W in H) if(W == H.w_uniform) // will be torn continue @@ -61,6 +65,9 @@ H.regenerate_icons() H.SetStunned(1) H.canmove = 0 + var/has_greater_form = H.dna.species.greater_form //cache this + if(has_greater_form) + H.set_species(has_greater_form) H.icon = null H.invisibility = 101 @@ -70,11 +77,10 @@ H.SetStunned(0) H.invisibility = initial(H.invisibility) - if(!H.dna.species.greater_form) //If the creature in question has no primitive set, this is going to be messy. + if(!has_greater_form) //If the creature in question has no primitive set, this is going to be messy. H.gib() return - H.set_species(H.dna.species.greater_form) H.real_name = H.dna.real_name H.name = H.real_name From 9286a1be1f8fecedc7acd880402db7537e0c74b6 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Sat, 21 Jul 2018 22:48:42 -0400 Subject: [PATCH 2/2] tweak --- code/game/dna/genes/monkey.dm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index 7df6ebcf3c1..d0c32b19620 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -22,12 +22,11 @@ H.regenerate_icons() H.SetStunned(1) H.canmove = 0 + H.icon = null + H.invisibility = 101 var/has_primitive_form = H.dna.species.primitive_form // cache this if(has_primitive_form) H.set_species(has_primitive_form) - H.icon = null - H.invisibility = 101 - new /obj/effect/temp_visual/monkeyify(H.loc) sleep(22) @@ -35,7 +34,7 @@ H.SetStunned(0) H.invisibility = initial(H.invisibility) - if(!has_primitive_form) //If the creature in question has no primitive set, this is going to be messy. + if(!has_primitive_form) //If the pre-change mob in question has no primitive set, this is going to be messy. H.gib() return @@ -65,11 +64,11 @@ H.regenerate_icons() H.SetStunned(1) H.canmove = 0 + H.icon = null + H.invisibility = 101 var/has_greater_form = H.dna.species.greater_form //cache this if(has_greater_form) H.set_species(has_greater_form) - H.icon = null - H.invisibility = 101 new /obj/effect/temp_visual/monkeyify/humanify(H.loc) sleep(22) @@ -77,7 +76,7 @@ H.SetStunned(0) H.invisibility = initial(H.invisibility) - if(!has_greater_form) //If the creature in question has no primitive set, this is going to be messy. + if(!has_greater_form) //If the pre-change mob in question has no primitive set, this is going to be messy. H.gib() return