summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-16 22:49:25 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-16 22:49:25 +0000
commit5026eca4d9818d32fe69571c1c621aa318bc4d48 (patch)
treee6bb7e0d962f4ca64f19b91c58b338eee1597aff /src/engine.cpp
parent9ee453c73292d460eda49129beddf00d21ea81c7 (diff)
downloadmana-client-5026eca4d9818d32fe69571c1c621aa318bc4d48.tar.gz
mana-client-5026eca4d9818d32fe69571c1c621aa318bc4d48.tar.bz2
mana-client-5026eca4d9818d32fe69571c1c621aa318bc4d48.tar.xz
mana-client-5026eca4d9818d32fe69571c1c621aa318bc4d48.zip
Added new barber by Neko-mon and moved being logic into Being class.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp33
1 files changed, 1 insertions, 32 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index adda6d06..2d93a842 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -272,38 +272,7 @@ void Engine::logic()
{
Being *being = (*beingIterator);
- if (being->job < 10) { // A player
- switch (being->action) {
- case WALK:
- being->frame = (get_elapsed_time(being->walk_time) * 4) /
- (being->speed);
- if (being->frame >= 4) {
- being->nextStep();
- }
- break;
- case ATTACK:
- being->frame = (get_elapsed_time(being->walk_time) * 4) /
- (being->aspd);
- if (being->frame >= 4) {
- being->nextStep();
- }
- break;
- default:
- break;
- }
-
- if (being->emotion != 0) {
- being->emotion_time--;
- if (being->emotion_time == 0) {
- being->emotion = 0;
- }
- }
- }
-
- if (get_elapsed_time(being->speech_time) > 5000)
- being->showSpeech = false;
- if (get_elapsed_time(being->damage_time) > 3000)
- being->showDamage = false;
+ being->logic();
if (being->action == MONSTER_DEAD && being->frame >= 20) {
delete being;