summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/game.cpp5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a3051117..3ae73d76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-09-11 Eugenio Favalli <elvenprogrammer@gmail.com>
+
+ * src/game.cpp: Fixed more fps issues.
+
2006-09-09 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/gui/gui.cpp: Removed easy targeting functionality since it
diff --git a/src/game.cpp b/src/game.cpp
index dbdfe481..3008e9cf 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -374,7 +374,9 @@ void Game::logic()
}
else
{
- while (abs(tick_time * 10 - drawTime) >= delta) {
+ if (abs(tick_time * 10 - drawTime) <= delta) {
+ SDL_Delay(10);
+ } else {
frame++;
engine->draw(graphics);
graphics->updateScreen();
@@ -385,6 +387,7 @@ void Game::logic()
else
{
SDL_Delay(10);
+ drawTime = tick_time * 10;
}
// Handle network stuff