summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-25 01:11:36 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-25 01:11:36 +0300
commite31bec39543cf616daac1be9b0d700a72a46b648 (patch)
tree89ab3955af6fcfaaddf9d71a158a2896534fe56a /src/being
parentdaa6841b2d2d2d4de530ffe01123fa62c1336e73 (diff)
downloadmv-e31bec39543cf616daac1be9b0d700a72a46b648.tar.gz
mv-e31bec39543cf616daac1be9b0d700a72a46b648.tar.bz2
mv-e31bec39543cf616daac1be9b0d700a72a46b648.tar.xz
mv-e31bec39543cf616daac1be9b0d700a72a46b648.zip
add pethandler with stubs only.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 383c3a14a..90912e8a7 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -51,6 +51,7 @@
#include "net/gamehandler.h"
#include "net/net.h"
#include "net/npchandler.h"
+#include "net/pethandler.h"
#include "net/playerhandler.h"
#include "resources/iteminfo.h"
@@ -1643,7 +1644,8 @@ void Being::petLogic()
if (divX >= warpDist || divY >= warpDist)
{
setAction(Being::STAND, 0);
- setTileCoords(dstX0, dstY0);
+ setTileCoords(dstX, dstY);
+ Net::getPetHandler()->spawn(mOwner, dstX, dstY);
}
else if (divX > followDist || divY > followDist)
{
@@ -1688,6 +1690,7 @@ void Being::petLogic()
}
}
setPath(mMap->findPath(mX, mY, dstX, dstY, walkMask));
+ Net::getPetHandler()->move(mOwner, mX, mY, dstX, dstY);
}
}
@@ -3131,10 +3134,11 @@ void Being::addPet(const int id)
id, ActorSprite::PET, 0);
if (being)
{
- being->setTileCoords(getTileX(), getTileY());
+ being->setTileCoords(mX, mY);
being->setOwner(this);
mPetId = id;
mPet = being;
+ Net::getPetHandler()->spawn(this, mX, mY);
}
}