summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-17 23:26:59 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-17 23:26:59 +0300
commit7e0a97d2521b9ce57003176e82a0b5564aa003c2 (patch)
tree5b2cfe1afe09bea1063f783050c1fb549daee76d /src/net/tmwa/beinghandler.cpp
parentf68cbf700a99f2f184715a5b8025bcb4b6525391 (diff)
downloadplus-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.gz
plus-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.bz2
plus-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.xz
plus-7e0a97d2521b9ce57003176e82a0b5564aa003c2.zip
Fix more code style and additional warnings.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 855972b95..dc815bf1c 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -518,7 +518,8 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType)
dstBeing->setStatusEffectBlock(32, msg.readInt16()); // opt3
msg.readInt8(); // karma
// reserving bit for future usage
- dstBeing->setGender(Being::intToGender(msg.readInt8() & 3));
+ dstBeing->setGender(Being::intToGender(
+ static_cast<uint8_t>(msg.readInt8() & 3)));
// Set these after the gender, as the sprites may be gender-specific
dstBeing->setSprite(SPRITE_WEAPON, weapon, "", 1, true);
@@ -647,7 +648,8 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType)
dstBeing->setStunMode(stunMode);
dstBeing->setStatusEffectBlock(0, static_cast<uint16_t>(
(statusEffects >> 16) & 0xffff));
- dstBeing->setStatusEffectBlock(16, statusEffects & 0xffff);
+ dstBeing->setStatusEffectBlock(16, static_cast<uint16_t>(
+ statusEffects & 0xffff));
if (msgType == 3 && dstBeing->getType() == Being::PLAYER)
dstBeing->setMoveTime();