diff options
Diffstat (limited to 'src/client/input.cc')
-rw-r--r-- | src/client/input.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/client/input.cc b/src/client/input.cc index 75fa0f3..5cbb17c 100644 --- a/src/client/input.cc +++ b/src/client/input.cc @@ -786,11 +786,8 @@ void frame(float seconds) for (Keyboard::iterator it = keyboard->begin(); it != keyboard->end(); it++) { key = (*it).second; if (key && key->pressed()) { - while ((key->pressed()+delay < core::application()->time()) && (key->lastpressed()+repeat < core::application()->time())) { - if (key->lastpressed() > key->pressed()) - key->key_lastpressed += repeat; - else - key->key_lastpressed += delay; + if ((key->pressed()+delay < core::application()->time()) && (key->lastpressed()+repeat < core::application()->time())) { + key->key_lastpressed = core::application()->time(); key_pressed(key); } } |