diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-12-13 20:03:25 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-12-13 20:03:25 +0000 |
commit | 8684a122e2a18c217dd9be896867d28fbf4f98d7 (patch) | |
tree | baa0ea8405b23a8575c5a4d15d9dbeac7a5f2ccd /src | |
parent | 30219be2ac73561f299b445504b9f3a211eefc7a (diff) | |
download | mana-8684a122e2a18c217dd9be896867d28fbf4f98d7.tar.gz mana-8684a122e2a18c217dd9be896867d28fbf4f98d7.tar.bz2 mana-8684a122e2a18c217dd9be896867d28fbf4f98d7.tar.xz mana-8684a122e2a18c217dd9be896867d28fbf4f98d7.zip |
Enabled monster emotions.
Diffstat (limited to 'src')
-rw-r--r-- | src/being.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
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: |