From 60efa209d05ecdfe5c6ad69c8e76e6a34b206e1b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Jan 2014 23:21:00 +0300 Subject: dont spawn pet on collision. --- src/being/being.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/being/being.cpp b/src/being/being.cpp index 511df5dc8..e155dc886 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -3312,6 +3312,14 @@ void Being::fixPetSpawnPos(int &dstX, int &dstY) const } dstX += offsetX; dstY += offsetY; + if (mMap) + { + if (!mMap->getWalk(dstX, dstY, getWalkMask())) + { + dstX = mOwner->getTileX(); + dstY = mOwner->getTileY(); + } + } } void Being::playSfx(const SoundInfo &sound, Being *const being, -- cgit v1.2.3-70-g09d2