summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions/pets.cpp3
-rw-r--r--src/net/eathena/pethandler.cpp3
-rw-r--r--src/net/eathena/playerhandler.cpp3
3 files changed, 4 insertions, 5 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp
index 2b3f6dfb8..925ab993f 100644
--- a/src/actions/pets.cpp
+++ b/src/actions/pets.cpp
@@ -157,9 +157,6 @@ impHandler0(petMoveRight)
impHandler0(petDirectUp)
{
- const Being *const pet = getPet();
- if (!pet)
- return false;
petHandler->setDirection(BeingDirection::UP);
return true;
}
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index fbdb52d2a..2b1e501f7 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -328,7 +328,8 @@ void PetHandler::setDirection(const unsigned char type) const
outMsg.writeInt32(0, "pet id");
outMsg.writeInt8(0, "head direction");
outMsg.writeInt8(0, "unused");
- outMsg.writeInt8(type, "pet direction");
+ outMsg.writeInt8(MessageOut::toServerDirection(type),
+ "pet direction");
}
void PetHandler::startAi(const bool start A_UNUSED) const
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index b5bc87dcf..1fa2d0329 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -209,7 +209,8 @@ void PlayerHandler::setDirection(const unsigned char direction) const
createOutPacket(CMSG_PLAYER_CHANGE_DIR);
outMsg.writeInt8(0, "head direction");
outMsg.writeInt8(0, "unused");
- outMsg.writeInt8(direction, "player direction");
+ outMsg.writeInt8(MessageOut::toServerDirection(direction),
+ "player direction");
}
void PlayerHandler::setDestination(const int x, const int y,