diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/being/being.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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, |