keyremapping: fix keys getting stuck from map loading
If a key is depressed when loading, the key press was not getting remapped, causing the camera to continiously spin. Change to only ignore key presses on the login screen.
This commit is contained in:
@@ -76,7 +76,7 @@ class KeyRemappingListener extends MouseAdapter implements KeyListener
|
||||
@Override
|
||||
public void keyPressed(KeyEvent e)
|
||||
{
|
||||
if (client.getGameState() != GameState.LOGGED_IN || !plugin.chatboxFocused())
|
||||
if (client.getGameState() == GameState.LOGIN_SCREEN || !plugin.chatboxFocused())
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ class KeyRemappingListener extends MouseAdapter implements KeyListener
|
||||
@Override
|
||||
public void keyReleased(KeyEvent e)
|
||||
{
|
||||
if (client.getGameState() != GameState.LOGGED_IN)
|
||||
if (client.getGameState() == GameState.LOGIN_SCREEN)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user