From 5416eaf6f3be3daff8dd4c058aed5185709db656 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 1 Aug 2021 12:39:17 +0200 Subject: [PATCH] [MIRROR] Fixes a mind transfer exploit concerning holopara/guardians. (#7261) * Fixes a mind transfer exploit concerning holopara/guardians. (#60533) Inverts the positions of the guardian/holoparasite typecheck code and the anti_magic/antag datums one. * Fixes a mind transfer exploit concerning holopara/guardians. Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/spells/spell_types/pointed/mind_transfer.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/spells/spell_types/pointed/mind_transfer.dm b/code/modules/spells/spell_types/pointed/mind_transfer.dm index 6d82c816716..99847aedffa 100644 --- a/code/modules/spells/spell_types/pointed/mind_transfer.dm +++ b/code/modules/spells/spell_types/pointed/mind_transfer.dm @@ -29,15 +29,15 @@ return FALSE var/mob/living/victim = targets[1] //The target of the spell whos body will be transferred to. + if(istype(victim, /mob/living/simple_animal/hostile/guardian)) + var/mob/living/simple_animal/hostile/guardian/stand = victim + if(stand.summoner) + victim = stand.summoner var/datum/mind/VM = victim.mind if(victim.anti_magic_check(TRUE, FALSE) || VM.has_antag_datum(/datum/antagonist/wizard) || VM.has_antag_datum(/datum/antagonist/cult) || VM.has_antag_datum(/datum/antagonist/changeling) || VM.has_antag_datum(/datum/antagonist/rev) || victim.key[1] == "@") if(!silent) to_chat(user, span_warning("[victim.p_their(TRUE)] mind is resisting your spell!")) return FALSE - if(istype(victim, /mob/living/simple_animal/hostile/guardian)) - var/mob/living/simple_animal/hostile/guardian/stand = victim - if(stand.summoner) - victim = stand.summoner //You should not be able to enter one of the most powerful side-antags as a fucking wizard. if(istype(victim,/mob/living/simple_animal/hostile/imp/slaughter))