From 4cede34a4911096aa57f88473a5e23b0ec9b8cb6 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Sat, 9 Nov 2024 11:08:51 +0100 Subject: [PATCH] [NO GBP] Fixes wings and jetpacks sometimes preventing you from opening doors (#87741) ## About The Pull Request I hate this timeline. What title says, makes jetpacks and wings allow you to bump into things you're moving into. ## Why It's Good For The Game This feels awful and requires you to stop pressing movement keys for a moment before resuming movement to get out of the "stuck" state ## Changelog :cl: fix: Fixed wings and jetpacks sometimes preventing you from opening doors /:cl: --- code/datums/components/jetpack.dm | 6 ++++++ .../surgery/organs/external/wings/functional_wings.dm | 2 +- code/modules/surgery/organs/external/wings/moth_wings.dm | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/datums/components/jetpack.dm b/code/datums/components/jetpack.dm index ccbe2b3fd4d..fd49aa2b67b 100644 --- a/code/datums/components/jetpack.dm +++ b/code/datums/components/jetpack.dm @@ -164,6 +164,12 @@ /datum/component/jetpack/proc/on_pushoff(mob/source, movement_dir, continuous_move, atom/backup) SIGNAL_HANDLER + if (get_dir(source, backup) == movement_dir || source.loc == backup.loc) + return + + if (!source.client.intended_direction || (source.client.intended_direction & get_dir(source, backup))) + return + if (!should_trigger(source) || !check_on_move.Invoke(FALSE)) return diff --git a/code/modules/surgery/organs/external/wings/functional_wings.dm b/code/modules/surgery/organs/external/wings/functional_wings.dm index 63759761548..f773630f8bf 100644 --- a/code/modules/surgery/organs/external/wings/functional_wings.dm +++ b/code/modules/surgery/organs/external/wings/functional_wings.dm @@ -145,7 +145,7 @@ if (get_dir(source, backup) == movement_dir || source.loc == backup.loc) return - if (!can_fly(source) || !source.client.intended_direction) + if (!can_fly(source) || !source.client.intended_direction || (source.client.intended_direction & get_dir(source, backup))) return return COMPONENT_PREVENT_SPACEMOVE_HALT diff --git a/code/modules/surgery/organs/external/wings/moth_wings.dm b/code/modules/surgery/organs/external/wings/moth_wings.dm index 2753c88f2c4..265a9ee7512 100644 --- a/code/modules/surgery/organs/external/wings/moth_wings.dm +++ b/code/modules/surgery/organs/external/wings/moth_wings.dm @@ -82,7 +82,7 @@ if (get_dir(source, backup) == movement_dir || source.loc == backup.loc) return - if (!allow_flight() || !source.client.intended_direction) + if (!allow_flight() || !source.client.intended_direction || (source.client.intended_direction & get_dir(source, backup))) return return COMPONENT_PREVENT_SPACEMOVE_HALT