Fixes being gibbed sometimes breaking observer movement #5499
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the pull request
Fixes a bug where having holding down the Ctrl or Alt key, being gibbed, then releasing the key could completely prevent you from moving. (Until you relog or respawn)
This was caused by
/datum/keybinding/mob/prevent_movement
'sdown()
/up()
procs returning early if the user's body was an observer.In this case,
user.movement_locked
gets set toTRUE
while the user has a body, the body gets gibbed and the user is forced into an observer, and then the proc is unable to set it back toFALSE
.cmss13/code/datums/keybinding/mob.dm
Lines 229 to 239 in 93a1a8b
Having spent a while looking around the codebase, I'm almost certain that removing the
isobserver()
checks won't have any negative side effects. Despite that, this PR should maybe get testmerged anyway just in case it does.Explain why it's good for the game
Observers should be able to move around.
Testing Photographs and Procedure
Screenshots & Videos
NOTE: These videos aren't the best at showing what's happening since you can't see my keyboard inputs, so for reference I started holding Ctrl before pressing 'Yes', then released it after the facehugger gibbed.
Before:
dreamseeker_cGbBIblGjW.mp4
After:
dreamseeker_V7Xmyx4Nbl.mp4
Changelog
🆑
fix: Fixed being gibbed with the Ctrl or Alt key held sometimes breaking movement as an observer.
/:cl: