diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-05-12 22:23:58 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-05-12 22:23:58 -0600 |
commit | 85ce3c416f6d6060c522ef6b3b5834f27f83cc5b (patch) | |
tree | c26c060c104881a8875e4141b5d42e7546864c7b /src/net/ea/beinghandler.cpp | |
parent | 94716c19748ab87a0a215f05e15ad6cac1008f07 (diff) | |
download | mana-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/ea/beinghandler.cpp')
-rw-r--r-- | src/net/ea/beinghandler.cpp | 5 |
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) { |