summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorTametomo <irarice@gmail.com>2009-04-15 20:08:21 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-15 20:10:13 +0200
commit9c2139f8b11f554cbc884bbb52278399e6994074 (patch)
treeb9b71740adb94bf9fd37d75dfb750cf34312806d /src/game.cpp
parentdcca13ea04fd7aa9b1539c1325cd0e465f9b545a (diff)
downloadmana-client-9c2139f8b11f554cbc884bbb52278399e6994074.tar.gz
mana-client-9c2139f8b11f554cbc884bbb52278399e6994074.tar.bz2
mana-client-9c2139f8b11f554cbc884bbb52278399e6994074.tar.xz
mana-client-9c2139f8b11f554cbc884bbb52278399e6994074.zip
Moved tile animations outside of the clock time polling loop. There's no
need to poll the CPU for them, when they already can compensate for missed clock ticks. Signed-off-by: Tametomo <irarice@gmail.com> Signed-off-by: Bjørn Lindeijer <bjorn@lindeijer.nl>
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 750725db..2ee4ad13 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -41,6 +41,7 @@
#include "keyboardconfig.h"
#include "localplayer.h"
#include "log.h"
+#include "map.h"
#include "npc.h"
#include "particle.h"
#include "player_relations.h"
@@ -95,8 +96,6 @@
#include "utils/gettext.h"
-class Map;
-
std::string map_path;
bool done = false;
@@ -473,6 +472,9 @@ void Game::logic()
while (!done)
{
+ if (Map *map = engine->getCurrentMap())
+ map->update(get_elapsed_time(gameTime));
+
// Handle all necessary game logic
while (get_elapsed_time(gameTime) > 0)
{