diff options
Diffstat (limited to 'src/monster.cpp')
-rw-r--r-- | src/monster.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/monster.cpp b/src/monster.cpp index f07f7447..299940c5 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -87,7 +87,10 @@ void Monster::draw(Graphics *graphics, int offsetX, int offsetY) mSpriteFrame += mFrame; } - mSpriteFrame = direction / 2 + 4 * mSpriteFrame; + unsigned char dir = 0; + while (!(direction & (1 << dir))) dir++; + + mSpriteFrame = dir + 4 * mSpriteFrame; Being::draw(graphics, offsetX - 12, offsetY - 25); } |