Browse Source

Fix bug when drawing mounts while walking

osmarjunior 6 years ago
parent
commit
3557879361
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      src/client/creature.cpp

+ 12
- 0
src/client/creature.cpp View File

@@ -877,6 +877,12 @@ int Creature::getDisplacementX()
877 877
         return 8;
878 878
     else if(m_outfit.getCategory() == ThingCategoryItem)
879 879
         return 0;
880
+
881
+    if(m_outfit.getMount() != 0) {
882
+        auto datType = g_things.rawGetThingType(m_outfit.getMount(), ThingCategoryCreature);
883
+        return datType->getDisplacementX();
884
+    }
885
+
880 886
     return Thing::getDisplacementX();
881 887
 }
882 888
 
@@ -886,6 +892,12 @@ int Creature::getDisplacementY()
886 892
         return 8;
887 893
     else if(m_outfit.getCategory() == ThingCategoryItem)
888 894
         return 0;
895
+
896
+    if(m_outfit.getMount() != 0) {
897
+        auto datType = g_things.rawGetThingType(m_outfit.getMount(), ThingCategoryCreature);
898
+        return datType->getDisplacementY();
899
+    }
900
+
889 901
     return Thing::getDisplacementY();
890 902
 }
891 903
 

Loading…
Cancel
Save