From 62879acf891f1939e16fa32d2426b56f08f1609b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 31 Dec 2013 15:41:34 +0300 Subject: add pet direction type if owner dead. New pet db attribute: deadDirectionType --- src/being/being.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/being/being.cpp') diff --git a/src/being/being.cpp b/src/being/being.cpp index d87eb5da6..160b5f925 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -1714,8 +1714,25 @@ void Being::petLogic() } if (mAction == STAND) { - const int directionType = mOwner->getCurrentAction() != SIT - ? mInfo->getDirectionType() : mInfo->getSitDirectionType(); + int directionType = 0; + switch (mOwner->getCurrentAction()) + { + case STAND: + case MOVE: + case ATTACK: + case HURT: + case SPAWN: + default: + directionType = mInfo->getDirectionType(); + break; + case SIT: + directionType = mInfo->getSitDirectionType(); + break; + case DEAD: + directionType = mInfo->getDeadDirectionType(); + break; + } + int newDir = 0; switch (directionType) { -- cgit v1.2.3-60-g2f50