diff options
Diffstat (limited to 'src/net/tmwa/beingrecv.cpp')
-rw-r--r-- | src/net/tmwa/beingrecv.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp index 012042b00..ae0b8df26 100644 --- a/src/net/tmwa/beingrecv.cpp +++ b/src/net/tmwa/beingrecv.cpp @@ -113,16 +113,11 @@ void BeingRecv::processBeingChangeLook2(Net::MessageIn &msg) msg.readBeingId("being id")); const uint8_t type = msg.readUInt8("type"); - int id2 = 0; const int16_t id = msg.readInt16("id1"); - if (type == 2) + int id2 = msg.readInt16("id2"); + if (type != 2) { - id2 = msg.readInt16("id2"); - } - else - { - msg.readInt16("id2"); id2 = 1; } @@ -1360,17 +1355,16 @@ void BeingRecv::processBeingSelfEffect(Net::MessageIn &msg) } const BeingId id = msg.readBeingId("being id"); + const int effectType = msg.readInt32("effect type"); + Being *const being = actorManager->findBeing(id); if (being == nullptr) { - DEBUGLOGSTR("insible player?"); - msg.readInt32("effect type"); + DEBUGLOGSTR("invisible player?"); BLOCK_END("BeingRecv::processBeingSelfEffect") return; } - const int effectType = msg.readInt32("effect type"); - if (ParticleEngine::enabled) effectManager->trigger(effectType, being, 0); @@ -1399,16 +1393,11 @@ void BeingRecv::processIpResponse(Net::MessageIn &msg) Being *const dstBeing = actorManager->findBeing( msg.readBeingId("being id")); + const int ipAddress = msg.readInt32("ip address"); if (dstBeing != nullptr) - { - const std::string ip = ipToString(msg.readInt32("ip address")); - dstBeing->setIp(ip); - } + dstBeing->setIp(ipToString(ipAddress)); else - { - msg.readInt32("ip address"); DEBUGLOGSTR("invisible player?"); - } BLOCK_END("BeingRecv::processIpResponse") } |