From 6437f7aee41ba340b3bd00abedcd68e47c9edf9c Mon Sep 17 00:00:00 2001 From: Kates <24830358+lbnesquik@users.noreply.github.com> Date: Sat, 1 Aug 2020 07:14:37 +0200 Subject: [PATCH] Attempt to fix mech and fighter movement issues within space. (#7376) * Attempt to fix mech and fighter movement issues within space. Here is the issue in question: https://github.com/VOREStation/VOREStation/issues/8438 * Update Mecha.dm to fix #7376 request --- code/game/mecha/mecha.dm | 9 +++++++++ code/modules/mob/mob_movement.dm | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 2fb9c36103..ca2bcab7b9 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -584,6 +584,15 @@ last_message = world.time return 0 + +/* +//A first draft of a check to stop mechs from moving fully. TBD when all thrusters modules are unified. + if(!thrusters && !src.pr_inertial_movement.active() && isspace(src.loc))//No thrsters, not drifting, in space + src.occupant_message("Error 543")//debug + return 0 +*/ + + if(!thrusters && src.pr_inertial_movement.active()) //I think this mean 'if you try to move in space without thruster, u no move' return 0 diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 58d00da19f..d364706513 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -197,7 +197,7 @@ return result // Can't control ourselves when drifting - if(isspace(loc) || my_mob.lastarea?.has_gravity == 0) + if((isspace(loc) || my_mob.lastarea?.has_gravity == 0) && !my_mob.in_enclosed_vehicle) //If(In space or last area had no gravity) or(you in vehicle) if(!my_mob.Process_Spacemove(0)) return 0