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

Player Continues Walking When Client Loses Focus #60

AntumDeluge opened this Issue Oct 26, 2017 · 0 comments


None yet
1 participant

AntumDeluge commented Oct 26, 2017

The issue is directly related to the text input area losing focus. It has been addressed before, but was seen as more of a feature at the time.

What happens is, when a player is using a directional key to walk, if the key is not released & the text input area loses focus, the keypress is not flushed & the character will continue walking in that direction indefinitely until focus is regained & direction key is pressed & released again. This was seen as a feature because it allowed players to walk long distances without having to hold down a key. But there are some pitfalls to it is well. It can potentially cause players to lose control in dangerous situations. For example, trying to escape from an enemy. If focus is lost unintentionally, players can lose control of their characters momentarily, causing them to perhaps move into an even more dangerous situation. Another example would be ground spikes. If a player is moving in the direction of harmful ground tiles & the client loses focus, the player may not be able to regain control of his/her character until it has already received damage. I have witnessed situations like this many times, especially in the deathmatch arena.

I believe that with the implementation of the auto-walk feature, which allows players to manually set continuously walking without holding a direction key, this issue should be fixed. I made a FIXME note in a recent commit: 7356677

SourceForge issue 5876

@AntumDeluge AntumDeluge self-assigned this Nov 11, 2017

AntumDeluge added a commit that referenced this issue Jun 14, 2018

Execute ConditionalStopAction when client loses focus to prevent...
...character from continuing walking via direction keypress.
FIXME: When focus is regained, direction key must be pressed twice to
resume walking. Key states not flushed correctly?

Potential fix for the following:
- #60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment