From 1888670781a0a8f4d14f58e5eab9173feeddfe46 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 Oct 2015 19:57:06 +0300 Subject: Fix default horses direction and action. --- src/being/being.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/being/being.cpp b/src/being/being.cpp index 96c94cc92..49d3ae4c7 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -4081,16 +4081,22 @@ void Being::setHorse(const int horseId) FOR_EACH (SpriteRefs, it, mHorseInfo->downSprites) { SpriteReference *const ref = *it; - mDownHorseSprites.push_back(AnimatedSprite::load( + AnimatedSprite *const sprite = AnimatedSprite::load( ref->sprite, - ref->variant)); + ref->variant); + mDownHorseSprites.push_back(sprite); + sprite->play(mSpriteAction); + sprite->setSpriteDirection(mSpriteDirection); } FOR_EACH (SpriteRefs, it, mHorseInfo->upSprites) { SpriteReference *const ref = *it; - mUpHorseSprites.push_back(AnimatedSprite::load( + AnimatedSprite *const sprite = AnimatedSprite::load( ref->sprite, - ref->variant)); + ref->variant); + mUpHorseSprites.push_back(sprite); + sprite->play(mSpriteAction); + sprite->setSpriteDirection(mSpriteDirection); } } } -- cgit v1.2.3-70-g09d2