diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-12-25 02:06:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-12-25 02:10:11 +0300 |
commit | 219424dc0e194a722bc93ba51b973fda8715869f (patch) | |
tree | be1586057d67bb329edad911a386d4945cba4882 /src/resources | |
parent | 2d4c4cb494842daa6b3865bc2729782098e367d8 (diff) | |
download | manaplus-219424dc0e194a722bc93ba51b973fda8715869f.tar.gz manaplus-219424dc0e194a722bc93ba51b973fda8715869f.tar.bz2 manaplus-219424dc0e194a722bc93ba51b973fda8715869f.tar.xz manaplus-219424dc0e194a722bc93ba51b973fda8715869f.zip |
add pet spawn offset in tiles from owner position.
New pet db attributes: offsetX, offsetY
Offset counted from player direction.
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/db/petdb.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp index 397af6220..eeb8af9a0 100644 --- a/src/resources/db/petdb.cpp +++ b/src/resources/db/petdb.cpp @@ -92,6 +92,11 @@ void PETDB::load() currentInfo->setWalkSpeed(XML::getProperty(petNode, "walkSpeed", 0)); + currentInfo->setTargetOffsetX(XML::getProperty(petNode, + "offsetX", 0)); + currentInfo->setTargetOffsetY(XML::getProperty(petNode, + "offsetY", 1)); + SpriteDisplay display; for_each_xml_child_node(spriteNode, petNode) |