diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/being/being.cpp | 4 | ||||
-rw-r--r-- | src/resources/db/horsedb.cpp | 4 | ||||
-rw-r--r-- | src/resources/horseinfo.h | 6 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 14fddc6c0..8ce14bc40 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -3521,7 +3521,9 @@ void Being::drawPlayer(Graphics *restrict const graphics, } drawBeingCursor(graphics, px, py); - drawPlayerSpriteAt(graphics, px, py); + drawPlayerSpriteAt(graphics, + px + mHorseInfo->riderOffsetX, + py + mHorseInfo->riderOffsetY); for_each_horses(mUpHorseSprites) { diff --git a/src/resources/db/horsedb.cpp b/src/resources/db/horsedb.cpp index 701bfd2f9..081a12c6f 100644 --- a/src/resources/db/horsedb.cpp +++ b/src/resources/db/horsedb.cpp @@ -141,6 +141,10 @@ void HorseDB::loadXmlFile(const std::string &fileName, "downOffsetX", offsetX); currentInfo->downOffsetY = XML::getProperty(horseNode, "downOffsetY", offsetY); + currentInfo->riderOffsetX = XML::getProperty(horseNode, + "riderOffsetX", 0); + currentInfo->riderOffsetY = XML::getProperty(horseNode, + "riderOffsetY", 0); for_each_xml_child_node(spriteNode, horseNode) { diff --git a/src/resources/horseinfo.h b/src/resources/horseinfo.h index c9d75f808..4ff1dfb09 100644 --- a/src/resources/horseinfo.h +++ b/src/resources/horseinfo.h @@ -34,7 +34,9 @@ struct HorseInfo final downOffsetX(0), downOffsetY(0), upOffsetX(0), - upOffsetY(0) + upOffsetY(0), + riderOffsetX(0), + riderOffsetY(0) { } A_DELETE_COPY(HorseInfo) @@ -45,6 +47,8 @@ struct HorseInfo final int downOffsetY; int upOffsetX; int upOffsetY; + int riderOffsetX; + int riderOffsetY; }; #endif // RESOURCES_HORSEINFO_H |