From 219424dc0e194a722bc93ba51b973fda8715869f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Dec 2013 02:06:09 +0300 Subject: add pet spawn offset in tiles from owner position. New pet db attributes: offsetX, offsetY Offset counted from player direction. --- src/resources/db/petdb.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/resources/db') 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) -- cgit v1.2.3-70-g09d2