diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-28 17:07:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-28 17:07:33 +0300 |
commit | 2cfa0d17583869b7a2fb6e558b160e46389f5599 (patch) | |
tree | f47e37d1c955365f9173ab53a1e9602e29903096 /src/being/being.cpp | |
parent | 4e7669dd6e07658fa86878d1e64c482a094b3b19 (diff) | |
download | mv-2cfa0d17583869b7a2fb6e558b160e46389f5599.tar.gz mv-2cfa0d17583869b7a2fb6e558b160e46389f5599.tar.bz2 mv-2cfa0d17583869b7a2fb6e558b160e46389f5599.tar.xz mv-2cfa0d17583869b7a2fb6e558b160e46389f5599.zip |
Impliment actual move actions from pet commands.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 289f49411..b5c317ac4 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -211,7 +211,8 @@ Being::Being(const int id, mShop(false), mAway(false), mInactive(false), - mNeedPosUpdate(true) + mNeedPosUpdate(true), + mPetAi(true) { for (int f = 0; f < 20; f ++) { @@ -1590,9 +1591,12 @@ void Being::petLogic() fixPetSpawnPos(dstX, dstY); setTileCoords(dstX, dstY); petHandler->spawn(mOwner, mId, dstX, dstY); + mPetAi = true; } else if (!followDist || divX > followDist || divY > followDist) { + if (!mPetAi) + return; if (!dist) { fixPetSpawnPos(dstX, dstY); @@ -1645,6 +1649,9 @@ void Being::petLogic() return; } } + if (!mPetAi) + return; + if (mOwner->getCurrentAction() != BeingAction::ATTACK) { if (mAction == BeingAction::ATTACK) |