summaryrefslogtreecommitdiff
path: root/src/net/beinghandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-26 14:20:50 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-11-26 14:20:50 +0000
commit7f819e46b584145e2cf2ea742ced9fab0ffc233e (patch)
tree9aa8ee99a4b4dd653917155282e82e6b9a64f718 /src/net/beinghandler.cpp
parentcc86266f4b59420a155df8c1aa01b9ce20b6585d (diff)
downloadmana-client-7f819e46b584145e2cf2ea742ced9fab0ffc233e.tar.gz
mana-client-7f819e46b584145e2cf2ea742ced9fab0ffc233e.tar.bz2
mana-client-7f819e46b584145e2cf2ea742ced9fab0ffc233e.tar.xz
mana-client-7f819e46b584145e2cf2ea742ced9fab0ffc233e.zip
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.
Diffstat (limited to 'src/net/beinghandler.cpp')
-rw-r--r--src/net/beinghandler.cpp10
1 files changed, 6 insertions, 4 deletions
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