diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/beinginfo.cpp | 1 | ||||
-rw-r--r-- | src/resources/beinginfo.h | 7 | ||||
-rw-r--r-- | src/resources/db/petdb.cpp | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index 7a8d1e0ce..7d769acbe 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -62,6 +62,7 @@ BeingInfo::BeingInfo() : mHeight(0), mStartFollowDist(3), mFollowDist(1), + mWalkSpeed(0), mStaticMaxHP(false), mTargetSelection(true) { diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h index a752898f8..556088380 100644 --- a/src/resources/beinginfo.h +++ b/src/resources/beinginfo.h @@ -236,6 +236,12 @@ class BeingInfo final int getFollowDist() { return mFollowDist; } + void setWalkSpeed(const int n) + { mWalkSpeed = n; } + + int getWalkSpeed() + { return mWalkSpeed; } + void setColorsList(const std::string &name); std::string getColor(const int idx) const; @@ -268,6 +274,7 @@ class BeingInfo final int mHeight; int mStartFollowDist; int mFollowDist; + int mWalkSpeed; bool mStaticMaxHP; bool mTargetSelection; }; diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp index 829da3ef6..0af2621ae 100644 --- a/src/resources/db/petdb.cpp +++ b/src/resources/db/petdb.cpp @@ -87,6 +87,9 @@ void PETDB::load() currentInfo->setFollowDist(XML::getProperty(petNode, "followDistance", 1)); + currentInfo->setWalkSpeed(XML::getProperty(petNode, + "walkSpeed", 0)); + SpriteDisplay display; for_each_xml_child_node(spriteNode, petNode) { |