makes steppy code better

This commit is contained in:
Seris02
2023-02-17 01:04:14 +08:00
parent d4c14d66b5
commit 44909f998d
+3 -2
View File
@@ -272,13 +272,14 @@
var/mob/living/carbon/human/prey = tmob
var/can_pass = TRUE
var/size_ratio_needed = (a_intent == I_DISARM || a_intent == I_HURT) ? 0.5 : (a_intent == I_GRAB ? 0.25 : 0) //the person trying to block us can be 25% bigger than the person we're trying to step on
if (isturf(prey.loc))
for (var/atom/movable/M in prey.loc)
if (prey == M)
if (prey == M || pred == M)
continue
if (istype(M, /mob/living))
var/mob/living/L = M
if (!(M.CanPass(src, prey.loc) || get_effective_size(FALSE) - L.get_effective_size(TRUE) >= 0.75))
if (!M.CanPass(src, prey.loc) && !(get_effective_size(FALSE) - L.get_effective_size(TRUE) >= size_ratio_needed || L.lying))
can_pass = FALSE
continue
if (!M.CanPass(src, prey.loc))