Skip to content

Commit

Permalink
Merge pull request #559 from osmarjunior/master
Browse files Browse the repository at this point in the history
Fix bug when drawing mounts while walking
  • Loading branch information
edubart committed Aug 22, 2014
2 parents fa317c5 + 3557879 commit 0909e18
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/client/creature.cpp
Expand Up @@ -877,6 +877,12 @@ int Creature::getDisplacementX()
return 8;
else if(m_outfit.getCategory() == ThingCategoryItem)
return 0;

if(m_outfit.getMount() != 0) {
auto datType = g_things.rawGetThingType(m_outfit.getMount(), ThingCategoryCreature);
return datType->getDisplacementX();
}

return Thing::getDisplacementX();
}

Expand All @@ -886,6 +892,12 @@ int Creature::getDisplacementY()
return 8;
else if(m_outfit.getCategory() == ThingCategoryItem)
return 0;

if(m_outfit.getMount() != 0) {
auto datType = g_things.rawGetThingType(m_outfit.getMount(), ThingCategoryCreature);
return datType->getDisplacementY();
}

return Thing::getDisplacementY();
}

Expand Down

0 comments on commit 0909e18

Please sign in to comment.