Merge pull request #559 from osmarjunior/master

Fix bug when drawing mounts while walking
This commit is contained in:
Eduardo Bart 2014-08-22 09:48:31 -03:00
commit 0909e186a1
1 changed files with 12 additions and 0 deletions

View File

@ -877,6 +877,12 @@ int Creature::getDisplacementX()
return 8; return 8;
else if(m_outfit.getCategory() == ThingCategoryItem) else if(m_outfit.getCategory() == ThingCategoryItem)
return 0; return 0;
if(m_outfit.getMount() != 0) {
auto datType = g_things.rawGetThingType(m_outfit.getMount(), ThingCategoryCreature);
return datType->getDisplacementX();
}
return Thing::getDisplacementX(); return Thing::getDisplacementX();
} }
@ -886,6 +892,12 @@ int Creature::getDisplacementY()
return 8; return 8;
else if(m_outfit.getCategory() == ThingCategoryItem) else if(m_outfit.getCategory() == ThingCategoryItem)
return 0; return 0;
if(m_outfit.getMount() != 0) {
auto datType = g_things.rawGetThingType(m_outfit.getMount(), ThingCategoryCreature);
return datType->getDisplacementY();
}
return Thing::getDisplacementY(); return Thing::getDisplacementY();
} }