Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes being gibbed sometimes breaking observer movement #5499

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

SabreML
Copy link
Member

@SabreML SabreML commented Jan 19, 2024

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's down()/up() procs returning early if the user's body was an observer.
In this case, user.movement_locked gets set to TRUE 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 to FALSE.

/datum/keybinding/mob/prevent_movement/down(client/user)
. = ..()
if(.)
return
user.movement_locked = TRUE
/datum/keybinding/mob/prevent_movement/up(client/user)
. = ..()
if(.)
return
user.movement_locked = FALSE


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:

@github-actions github-actions bot added the Fix Fix one bug, make ten more label Jan 19, 2024
@harryob harryob added this pull request to the merge queue Jan 23, 2024
Merged via the queue into cmss13-devs:master with commit 67ce3a5 Jan 23, 2024
28 checks passed
cm13-github added a commit that referenced this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Fix one bug, make ten more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants