summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-02 14:05:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-02 14:05:30 +0300
commit962f182fcc989ec587282e44f889188ce241ba31 (patch)
treeda100971ec4952d0c56cb404862099c670bcfe0e /src/net/tmwa/beinghandler.cpp
parent4df121e6dcdf53436f50ce81dd60096ce0138a2c (diff)
downloadplus-962f182fcc989ec587282e44f889188ce241ba31.tar.gz
plus-962f182fcc989ec587282e44f889188ce241ba31.tar.bz2
plus-962f182fcc989ec587282e44f889188ce241ba31.tar.xz
plus-962f182fcc989ec587282e44f889188ce241ba31.zip
Add const to more classes.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index a4ab0f48b..2eac3c4a2 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -267,7 +267,7 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, bool look2)
if (!(dstBeing = actorSpriteManager->findBeing(msg.readInt32())))
return;
- int type = msg.readInt8();
+ const int type = msg.readInt8();
int id = 0;
int id2 = 0;
std::string color;
@@ -391,8 +391,8 @@ void BeingHandler::processNameResponse2(Net::MessageIn &msg)
Being *dstBeing;
- int len = msg.readInt16();
- int beingId = msg.readInt32();
+ const int len = msg.readInt16();
+ const int beingId = msg.readInt32();
std::string str = msg.readString(len - 8);
if ((dstBeing = actorSpriteManager->findBeing(beingId)))
{
@@ -411,10 +411,10 @@ void BeingHandler::processNameResponse2(Net::MessageIn &msg)
if (player_node)
{
- Party *party = player_node->getParty();
+ const Party *const party = player_node->getParty();
if (party && party->isMember(dstBeing->getId()))
{
- PartyMember *member = party->getMember(
+ PartyMember *const member = party->getMember(
dstBeing->getId());
if (member)
@@ -442,14 +442,14 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType)
// An update about a player, potentially including movement.
- int id = msg.readInt32();
- short speed = msg.readInt16();
- uint16_t stunMode = msg.readInt16(); // opt1; Aethyra use this as cape
+ const int id = msg.readInt32();
+ const short speed = msg.readInt16();
+ const uint16_t stunMode = msg.readInt16(); // opt1; Aethyra use this as cape
uint32_t statusEffects = msg.readInt16(); // opt2;
// Aethyra use this as misc1
statusEffects |= (static_cast<uint32_t>(msg.readInt16()))
<< 16; // status.options; Aethyra uses this as misc2
- short job = msg.readInt16();
+ const short job = msg.readInt16();
dstBeing = actorSpriteManager->findBeing(id);
@@ -471,7 +471,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType)
dstBeing->setDirection(dir);
}
- if (Party *party = player_node->getParty())
+ if (Party *const party = player_node->getParty())
{
if (party->isMember(id))
dstBeing->setParty(party);
@@ -559,7 +559,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType)
if (srcX != dstX || srcY != dstY)
{
- int d = dstBeing->calcDirection(dstX, dstY);
+ const int d = dstBeing->calcDirection(dstX, dstY);
if (d && dstBeing->getDirection() != d)
dstBeing->setDirectionDelayed(static_cast<uint8_t>(d));
@@ -591,7 +591,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType)
if (msgType == 1 || msgType == 2)
{
- int type = msg.readInt8();
+ const int type = msg.readInt8();
switch (type)
{
case 0: