diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-11 08:08:21 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-04-11 08:08:21 +0000 |
commit | 222f8a034707e8f57dc0e4795462af610a911d75 (patch) | |
tree | b3d326477ff6da6718110c0becafb51bd8c0430f /src/engine.cpp | |
parent | ac6ed9c03198156e7ebeefc18f2ba04073d5acb8 (diff) | |
download | mana-222f8a034707e8f57dc0e4795462af610a911d75.tar.gz mana-222f8a034707e8f57dc0e4795462af610a911d75.tar.bz2 mana-222f8a034707e8f57dc0e4795462af610a911d75.tar.xz mana-222f8a034707e8f57dc0e4795462af610a911d75.zip |
Now damage and speech times are fps independent
and if they're displayed is checked in logic
I also centered the speech above the player
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 563247df..940bac79 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -275,6 +275,11 @@ void Engine::logic() } } } + + if (get_elapsed_time(being->speech_time) > 5000) + being->showSpeech = false; + if (get_elapsed_time(being->damage_time) > 3000) + being->showDamage = false; if (being->action == MONSTER_DEAD && being->frame >= 20) { delete being; @@ -471,9 +476,6 @@ void Engine::draw() while (beingIterator != beings.end()) { Being *being = (*beingIterator); - // Tick the beings (gives them a sense of time) - being->tick(); - being->drawSpeech(guiGraphics); beingIterator++; |