From c2e8259216d467e866ce0a1a4dfac2b98341fea3 Mon Sep 17 00:00:00 2001 From: Will <7099514+Willburd@users.noreply.github.com> Date: Sat, 7 Jun 2025 18:33:41 -0400 Subject: [PATCH] Patch for fake attackers (#17816) --- code/modules/flufftext/fake_attacker.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/flufftext/fake_attacker.dm b/code/modules/flufftext/fake_attacker.dm index f8a3fc2c5e..d3bce92f66 100644 --- a/code/modules/flufftext/fake_attacker.dm +++ b/code/modules/flufftext/fake_attacker.dm @@ -127,11 +127,13 @@ T = get_turf(clone) var/turf/CT = T for(var/i = 0 to 8) + if(!CT) // Emergency exit + return null var/Cdir = pick(GLOB.cardinal) if(prob(30)) Cdir = clone.dir // Results in hallucinations somewhat being in front of you var/turf/NT = get_step(CT,Cdir) - if(!NT.density) + if(NT && !NT.density) CT = NT T = CT