From b8d60a33bd19a9e5f9ddd624cc33a936be35b989 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Fri, 21 Feb 2020 23:29:13 -0700
Subject: [PATCH] partial fix
---
code/modules/mob/living/living_mobility.dm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/code/modules/mob/living/living_mobility.dm b/code/modules/mob/living/living_mobility.dm
index 175921efe8..e3e159c179 100644
--- a/code/modules/mob/living/living_mobility.dm
+++ b/code/modules/mob/living/living_mobility.dm
@@ -15,8 +15,6 @@
if(!silent)
to_chat(src, "You are now [resting? "resting" : "getting up"].")
update_resting(updating)
- if(has_gravity() && resting)
- playsound(src, "bodyfall", 20, 1)
/mob/living/proc/update_resting(update_mobility = TRUE)
if(update_mobility)
@@ -54,6 +52,8 @@
if(ignoretimer)
set_resting(FALSE, FALSE)
return TRUE
+ else if(!CHECK_MOBILITY(src, MOBILITY_MOVE))
+ to_chat(src, "You are unable to stand up right now.")
else
var/totaldelay = 3 //A little bit less than half of a second as a baseline for getting up from a rest
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
@@ -79,7 +79,7 @@
var/usernotice = automatic ? "You are now getting up. (Auto)" : "You are now getting up."
visible_message("[standupwarning]", usernotice, vision_distance = 5)
if(do_after(src, totaldelay, target = src, required_mobility_flags = MOBILITY_MOVE))
- set_resting(FALSE, FALSE)
+ set_resting(FALSE, TRUE)
attemptingstandup = FALSE
return TRUE
else
@@ -89,6 +89,7 @@
playsound(src, "bodyfall", 20, 1)
return FALSE
+
//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it.
//Robots, animals and brains have their own version so don't worry about them
/mob/living/proc/update_mobility()
@@ -134,6 +135,8 @@
mobility_flags &= ~MOBILITY_STAND
if(!lying) //force them on the ground
lying = pick(90, 270)
+ if(has_gravity() && !buckled)
+ playsound(src, "bodyfall", 20, 1)
else
mobility_flags |= MOBILITY_STAND
lying = 0