From fd6134f06b02a16b84f66d324fd0c4781645ac08 Mon Sep 17 00:00:00 2001 From: GrrrKitten Date: Thu, 4 Jul 2024 21:36:44 -0400 Subject: [PATCH] Stops queen from stomping mob_pass/xeno_pass and bug fix --- .../living/carbon/xenomorph/castes/Queen.dm | 2 ++ code/modules/mob/living/living.dm | 23 +++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index a66903a938c5..858794ac21af 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -420,6 +420,8 @@ /mob/living/carbon/xenomorph/queen/proc/check_block(mob/queen, turf/new_loc) SIGNAL_HANDLER for(var/mob/living/carbon/xenomorph/xeno in new_loc.contents) + if(xeno.pass_flags.flags_pass & PASS_MOB_THRU_XENO|PASS_MOB_THRU &! xeno.flags_pass_temp & PASS_MOB_THRU) + return if(xeno.hivenumber == hivenumber) xeno.KnockDown((5 DECISECONDS) / GLOBAL_STATUS_MULTIPLIER) playsound(src, 'sound/weapons/alien_knockdown.ogg', 25, 1) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 5f917cf6e0d5..19d2be97621c 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -388,20 +388,23 @@ if(loc && !loc.Adjacent(L.loc)) now_pushing = FALSE return - var/oldloc = loc - var/oldLloc = L.loc - L.add_temp_pass_flags(PASS_MOB_THRU) - add_temp_pass_flags(PASS_MOB_THRU) + if(!(L.pass_flags.flags_pass & PASS_MOB_THRU)) //if they already pass through mob thi stuff is unnecessary - L.Move(oldloc) - Move(oldLloc) + var/oldloc = loc + var/oldLloc = L.loc - remove_temp_pass_flags(PASS_MOB_THRU) - L.remove_temp_pass_flags(PASS_MOB_THRU) + L.add_temp_pass_flags(PASS_MOB_THRU) + add_temp_pass_flags(PASS_MOB_THRU) - now_pushing = FALSE - return + L.Move(oldloc) + Move(oldLloc) + + remove_temp_pass_flags(PASS_MOB_THRU) + L.remove_temp_pass_flags(PASS_MOB_THRU) + + now_pushing = FALSE + return now_pushing = FALSE