summaryrefslogtreecommitdiff
path: root/src/net/ea/beinghandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/beinghandler.cpp')
-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)
{