From 894498f36c909592242e422f1d799b8007f1daf9 Mon Sep 17 00:00:00 2001 From: Sharkmare <34294231+Sharkmare@users.noreply.github.com> Date: Thu, 2 Mar 2023 11:51:50 +0100 Subject: [PATCH] Fixes #5667 VR Crash Make it so that a carbon body without a mind can not be TFed, the only time this is really the case is when you dsconnect in VR. Possibly sleevemated bodies too. --- code/modules/vore/mouseray.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/vore/mouseray.dm b/code/modules/vore/mouseray.dm index dffd1294c1..74fd8d6a38 100644 --- a/code/modules/vore/mouseray.dm +++ b/code/modules/vore/mouseray.dm @@ -84,6 +84,10 @@ var/mob/living/M = target if(!istype(M)) return + //CHOMPADDITION: prevent trding bodies that have no mind and are carbon, mianly fixes VR crash + if(istype(M,/mob/living/carbon) && !M.mind) + return + //CHOMPADDITION: prevent trding bodies that have no mind and are carbon, mianly fixes VR crash if(target != firer) //If you shot yourself, you probably want to be TFed so don't bother with prefs. if(!M.allow_spontaneous_tf && !tf_admin_pref_override) return