From 5066a6d0014b54dae2c3e6cacce406b9ee456bfc Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Fri, 29 Mar 2024 13:37:28 +0300 Subject: [PATCH 1/2] Update launching.dm --- code/modules/movement/launching/launching.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/code/modules/movement/launching/launching.dm b/code/modules/movement/launching/launching.dm index 778c452a3240..5fdab1fa1af3 100644 --- a/code/modules/movement/launching/launching.dm +++ b/code/modules/movement/launching/launching.dm @@ -183,20 +183,17 @@ add_temp_pass_flags(pass_flags) var/turf/start_turf = get_step_towards(src, LM.target) - var/list/turf/path = get_line(start_turf, LM.target) var/last_loc = loc var/early_exit = FALSE LM.dist = 0 - for (var/turf/T in path) - if (!src || !throwing || loc != last_loc || !isturf(src.loc)) - break + while (src && throwing && loc == last_loc && isturf(src.loc)) // While looks scary at first but it's basically just a for until LM.dist reaches LM.range if (!LM || QDELETED(LM)) early_exit = TRUE break if (LM.dist >= LM.range) break - if (!Move(T)) // If this returns FALSE, then a collision happened + if (!Move(get_step_towards(src, LM.target))) // If this returns FALSE, then a collision happened break last_loc = loc if (++LM.dist >= LM.range) From 73147634ec44e3039228f3d344fec45823f5b000 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:24:36 +0300 Subject: [PATCH 2/2] Update launching.dm --- code/modules/movement/launching/launching.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/movement/launching/launching.dm b/code/modules/movement/launching/launching.dm index 5fdab1fa1af3..3e188abb1067 100644 --- a/code/modules/movement/launching/launching.dm +++ b/code/modules/movement/launching/launching.dm @@ -182,7 +182,6 @@ add_temp_pass_flags(pass_flags) - var/turf/start_turf = get_step_towards(src, LM.target) var/last_loc = loc var/early_exit = FALSE