summaryrefslogtreecommitdiff
path: root/src/net/tmwserv/beinghandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-07 19:26:11 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-07 19:26:11 +0200
commitef1975a3eb4e1986601ad154bf184e0de332870c (patch)
tree53388463a481577afab64573169f6959d9b8c6d9 /src/net/tmwserv/beinghandler.cpp
parent8f4d75cadd75e71daf5689a2d289bd2e0deea533 (diff)
downloadmana-ef1975a3eb4e1986601ad154bf184e0de332870c.tar.gz
mana-ef1975a3eb4e1986601ad154bf184e0de332870c.tar.bz2
mana-ef1975a3eb4e1986601ad154bf184e0de332870c.tar.xz
mana-ef1975a3eb4e1986601ad154bf184e0de332870c.zip
Fixed compile warnings about unsigned/signed comparisons
Diffstat (limited to 'src/net/tmwserv/beinghandler.cpp')
-rw-r--r--src/net/tmwserv/beinghandler.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/net/tmwserv/beinghandler.cpp b/src/net/tmwserv/beinghandler.cpp
index 0752497e..292a3e3f 100644
--- a/src/net/tmwserv/beinghandler.cpp
+++ b/src/net/tmwserv/beinghandler.cpp
@@ -264,10 +264,11 @@ void BeingHandler::handleBeingsMoveMessage(MessageIn &msg)
void BeingHandler::handleBeingAttackMessage(MessageIn &msg)
{
Being *being = beingManager->findBeing(msg.readInt16());
- int direction = msg.readInt8();
- int attackType = msg.readInt8();
+ const int direction = msg.readInt8();
+ const int attackType = msg.readInt8();
- if (!being) return;
+ if (!being)
+ return;
switch (direction)
{
@@ -295,13 +296,14 @@ void BeingHandler::handleBeingsDamageMessage(MessageIn &msg)
void BeingHandler::handleBeingActionChangeMessage(MessageIn &msg)
{
- Being* being = beingManager->findBeing(msg.readInt16());
+ Being *being = beingManager->findBeing(msg.readInt16());
Being::Action action = (Being::Action) msg.readInt8();
- if (!being) return;
+ if (!being)
+ return;
being->setAction(action);
- if (action == Being::DEAD && being==player_node)
+ if (action == Being::DEAD && being == player_node)
{
static char const *const deadMsg[] =
{
@@ -330,8 +332,9 @@ void BeingHandler::handleBeingActionChangeMessage(MessageIn &msg)
void BeingHandler::handleBeingLooksChangeMessage(MessageIn &msg)
{
Being *being = beingManager->findBeing(msg.readInt16());
- if (!being || being->getType() != Being::PLAYER) return;
- Player * player = static_cast< Player * >(being);
+ if (!being || being->getType() != Being::PLAYER)
+ return;
+ Player *player = static_cast<Player *>(being);
handleLooks(player, msg);
if (msg.getUnreadLength())
{