Fix moth flight in space (#96353)

## About The Pull Request

Fixes #96344

The `if(!continuous_move && movement_dir)` did not respect whether the
"jetpack" was usable or not, allowing you to free-float regardless of
context.

I wrapped them in the same check and it seems to work fine in both
contexts (stabilizers on or actively moving).

I presume this affected more than just moth wings (empty jetpacks,
probably) but I'm not going to check

## Changelog

🆑 Melbert
fix: Fix moths being able to fly in space
/🆑
This commit is contained in:
MrMelbert
2026-06-06 11:43:56 -05:00
committed by GitHub
parent 9876714544
commit 0d71bd9daf
+14 -5
View File
@@ -136,13 +136,22 @@
if(source.client.intended_direction && check_on_move.Invoke(TRUE)) //You use jet when press keys. yes.
trail?.generate_effect()
/// Handles all active 0g movement, including both manual (trying to move a direction in 0g) and automatic (drifting idly in 0g)
/datum/component/jetpack/proc/stabilize(mob/source, movement_dir, continuous_move, backup)
SIGNAL_HANDLER
if(!continuous_move && movement_dir)
return COMSIG_MOVABLE_STOP_SPACEMOVE
// Check if we have the fuel to stop this. Do NOT consume any fuel, just check
// This is done because things other then us can use our fuel
if(stabilize && check_on_move.Invoke(FALSE))
/*
* Checks if we should stop any active movement
*
* Obviously we stop all forms of drifting if we have stabilizers active (allowing free space movement)
* Less obviously, we stop need to stop drift if we are trying to move *while passively drifting*
* (Without checking the latter, jetpacks will act very weird and jank. As you move in one direction,
* you will simultaneously drift in that direction, causing you to jump/skip a tile every so often.)
*
* Either way, we need to check that we have the "fuel" to stop this
* DO NOT CONSUME FUEL HERE, just check if we have it
* This is done because things other then us can use our fuel
*/
if((stabilize || (!continuous_move && movement_dir)) && check_on_move.Invoke(FALSE))
return COMSIG_MOVABLE_STOP_SPACEMOVE
return NONE