From 5c16f1339424f8e692d33f9b55c42025dd9a814e Mon Sep 17 00:00:00 2001 From: Higgin Date: Thu, 21 Oct 2021 05:35:02 -0700 Subject: [PATCH] Makes bodies laying on the ground also act as obstacles to crawling. Adds proper comments. --- code/modules/mob/living/living.dm | 12 ++++++------ code/modules/mob/living/living_movement.dm | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index be8241c063..c05215bc6f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -116,19 +116,19 @@ to_chat(src, "[L] is restraining [P], you cannot push past.") return 1 - //CIT CHANGES START HERE - makes it so resting stops you from moving through standing folks without a short delay - if(!CHECK_MOBILITY(src, MOBILITY_STAND) && CHECK_MOBILITY(L, MOBILITY_STAND)) + //CIT CHANGES START HERE - makes it so resting stops you from moving through standing folks or over prone bodies without a short delay + if(!CHECK_MOBILITY(src, MOBILITY_STAND)) var/origtargetloc = L.loc if(!pulledby) if(combat_flags & COMBAT_FLAG_ATTEMPTING_CRAWL) return TRUE if(IS_STAMCRIT(src)) - to_chat(src, "You're too exhausted to crawl under [L].") + to_chat(src, "You're too exhausted to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under": "over"] [L].") return TRUE ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL) - visible_message("[src] is attempting to crawl under [L].", - "You are now attempting to crawl under [L].", - target = L, target_message = "[src] is attempting to crawl under you.") + visible_message("[src] is attempting to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under" : "over"] [L].", + "You are now attempting to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under": "over"] [L].", + target = L, target_message = "[src] is attempting to crawl [(CHECK_MOBILITY(L, MOBILITY_STAND)) ? "under" : "over"] you.") if(!do_after(src, CRAWLUNDER_DELAY, target = src) || CHECK_MOBILITY(src, MOBILITY_STAND)) DISABLE_BITFIELD(combat_flags, COMBAT_FLAG_ATTEMPTING_CRAWL) return TRUE diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm index 07b40b3ab1..075a135f76 100644 --- a/code/modules/mob/living/living_movement.dm +++ b/code/modules/mob/living/living_movement.dm @@ -37,6 +37,8 @@ if(mover in buckled_mobs) return TRUE var/mob/living/L = mover //typecast first, check isliving and only check this if living using short circuit + if(lying && L.lying) //if we're both lying down and aren't already being thrown/shipped around, don't pass + return FALSE return (!density || (isliving(mover)? L.can_move_under_living(src) : !mover.density)) /mob/living/toggle_move_intent()