From 7f819e46b584145e2cf2ea742ced9fab0ffc233e Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 26 Nov 2006 14:20:50 +0000 Subject: Made Being::mDirection protected, forcing the use of setDirection. Defaulted variant argument to 0 since this is the most common situation. Some SpriteDef refactoring, splitting up the loading into several methods, in preparation of adding support for including other sprites. --- src/net/beinghandler.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/net/beinghandler.cpp') diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 85760112..4fcf2105 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -138,8 +138,9 @@ void BeingHandler::handleMessage(MessageIn *msg) } else { - msg->readCoordinates(dstBeing->mX, dstBeing->mY, - dstBeing->mDirection); + Uint8 dir; + msg->readCoordinates(dstBeing->mX, dstBeing->mY, dir); + dstBeing->setDirection(dir); } msg->readInt8(); // unknown @@ -342,8 +343,9 @@ void BeingHandler::handleMessage(MessageIn *msg) } else { - msg->readCoordinates(dstBeing->mX, dstBeing->mY, - dstBeing->mDirection); + Uint8 dir; + msg->readCoordinates(dstBeing->mX, dstBeing->mY, dir); + dstBeing->setDirection(dir); } msg->readInt8(); // unknown -- cgit v1.2.3-60-g2f50