summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being/being.cpp44
-rw-r--r--src/resources/db/petdb.cpp2
2 files changed, 26 insertions, 20 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index b7d6019ec..a8b3eaf8c 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -1650,28 +1650,34 @@ void Being::petLogic()
}
else if (divX > followDist || divY > followDist)
{
- if (divX > followDist)
+ if (!dist)
{
- if (dstX > mX + dist)
- dstX -= dist;
- else if (dstX + dist <= mX)
- dstX += dist;
+ fixPetSpawnPos(dstX, dstY);
}
else
{
- dstX = mX;
- }
-
- if (divY > followDist)
- {
- if (dstY > mY + dist)
- dstY -= dist;
- else if (dstX + dist <= mX)
- dstY += dist;
- }
- else
- {
- dstY = mY;
+ if (divX > followDist)
+ {
+ if (dstX > mX + dist)
+ dstX -= dist;
+ else if (dstX + dist <= mX)
+ dstX += dist;
+ }
+ else
+ {
+ dstX = mX;
+ }
+ if (divY > followDist)
+ {
+ if (dstY > mY + dist)
+ dstY -= dist;
+ else if (dstX + dist <= mX)
+ dstY += dist;
+ }
+ else
+ {
+ dstY = mY;
+ }
}
const int walkMask = getWalkMask();
@@ -3191,7 +3197,7 @@ void Being::fixPetSpawnPos(int &dstX, int &dstY) const
switch (mOwner->getDirection())
{
case LEFT:
- offsetX = offsetY1;
+ offsetX = -offsetY1;
offsetY = -offsetX1;
break;
case RIGHT:
diff --git a/src/resources/db/petdb.cpp b/src/resources/db/petdb.cpp
index eeb8af9a0..d50c44dc7 100644
--- a/src/resources/db/petdb.cpp
+++ b/src/resources/db/petdb.cpp
@@ -85,7 +85,7 @@ void PETDB::load()
currentInfo->setStartFollowDist(XML::getProperty(petNode,
"startFollowDistance", 3));
currentInfo->setFollowDist(XML::getProperty(petNode,
- "followDistance", 1));
+ "followDistance", 0));
currentInfo->setWarpDist(XML::getProperty(petNode,
"warpDistance", 11));