summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-12 22:23:58 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-12 22:23:58 -0600
commit85ce3c416f6d6060c522ef6b3b5834f27f83cc5b (patch)
treec26c060c104881a8875e4141b5d42e7546864c7b /src/net
parent94716c19748ab87a0a215f05e15ad6cac1008f07 (diff)
downloadmana-85ce3c416f6d6060c522ef6b3b5834f27f83cc5b.tar.gz
mana-85ce3c416f6d6060c522ef6b3b5834f27f83cc5b.tar.bz2
mana-85ce3c416f6d6060c522ef6b3b5834f27f83cc5b.tar.xz
mana-85ce3c416f6d6060c522ef6b3b5834f27f83cc5b.zip
Fix up handling of GM status
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/beinghandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 5a49442c..34a0d70a 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -508,8 +508,9 @@ void BeingHandler::handleMessage(MessageIn &msg)
}
gmstatus = msg.readInt16();
- if ((gmstatus & 0x80) && dstBeing->getType() == Being::PLAYER)
- static_cast<Player*>(dstBeing)->setGM();
+ if (gmstatus & 0x80)
+ if (Player *player = dynamic_cast<Player*>(dstBeing))
+ player->setGM(true);
if (msg.getId() == SMSG_PLAYER_UPDATE_1)
{