From 8684a122e2a18c217dd9be896867d28fbf4f98d7 Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Tue, 13 Dec 2005 20:03:25 +0000 Subject: Enabled monster emotions. --- src/being.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/being.cpp b/src/being.cpp index 6b26afad..2bea8341 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -345,14 +345,6 @@ Being::logic() } break; } - - if (emotion != 0) - { - emotion_time--; - if (emotion_time == 0) { - emotion = 0; - } - } } if (getType() == MONSTER && action != STAND) @@ -374,6 +366,14 @@ Being::logic() mPy += getYOffset(); mPx += getXOffset(); } + + if (emotion != 0) + { + emotion_time--; + if (emotion_time == 0) { + emotion = 0; + } + } } void @@ -592,6 +592,11 @@ Being::draw(Graphics *graphics, int offsetX, int offsetY) graphics->drawImage( monsterset[job-1002]->spriteset[dir + 4 * frame], px - 12, py - 25); + if (emotion != 0) + { + graphics->drawImage(emotionset->spriteset[emotion - 1], + px + 3, py - 60); + } break; default: -- cgit v1.2.3-70-g09d2