diff options
author | Tametomo <irarice@gmail.com> | 2009-04-11 11:32:30 -0600 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2010-02-13 13:06:56 +0100 |
commit | 5cb317f177b3c8f9571eef75a7f7c8c486107586 (patch) | |
tree | a9a0d3ce9347c66612305ecf27a62dba68a4c633 /src | |
parent | 94727e1a91ada52ace0950cb3a9c22a53a3f5bb6 (diff) | |
download | mana-5cb317f177b3c8f9571eef75a7f7c8c486107586.tar.gz mana-5cb317f177b3c8f9571eef75a7f7c8c486107586.tar.bz2 mana-5cb317f177b3c8f9571eef75a7f7c8c486107586.tar.xz mana-5cb317f177b3c8f9571eef75a7f7c8c486107586.zip |
Moved keyboard input polling outside of the clock time loop. This isn't
necessary so long as you're at least getting 1-2 fps (which would
result in a typing speed between 60-120 wpm). Even then, you've got
more serious things to be thinking about at that point than if all of
your input is being tracked, and having it inside the clock time loop
just cuts performance for everyone else.
This loop should get removed altogether, but there are a few items left
in it at the moment which would need to get reworked first before it can
be eliminated. In cases where you can't accurately know where something
would be because it's random, we should just scale the random formulas
to take a more drastic adjustment to compensate for that lag.
Signed-off-by: Tametomo <irarice@gmail.com>
Manual-merge-by: Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 85dabbc9..56a25faf 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -444,10 +444,11 @@ void Game::exec() if (mCurrentMap) mCurrentMap->update(get_elapsed_time(gameTime)); + handleInput(); + // Handle all necessary game logic while (get_elapsed_time(gameTime) > 0) { - handleInput(); beingManager->logic(); particleEngine->update(); gui->logic(); |