From 1cf6cb343c6c8df8a998c617fd6f8d40f5affbea Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 22 Mar 2016 18:59:41 +0300 Subject: Add support for packet version in servers list xml and in editor. --- src/net/ea/beingrecv.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/net/ea') diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp index 2a0351ef2..9796af9ce 100644 --- a/src/net/ea/beingrecv.cpp +++ b/src/net/ea/beingrecv.cpp @@ -286,14 +286,12 @@ void BeingRecv::processBeingEmotion(Net::MessageIn &msg) return; } - if (player_relations.hasPermission(dstBeing, PlayerRelation::EMOTE)) + const uint8_t emote = msg.readUInt8("emote"); + if (emote && + player_relations.hasPermission(dstBeing, PlayerRelation::EMOTE)) { - const uint8_t emote = msg.readUInt8("emote"); - if (emote) - { - dstBeing->setEmote(emote, 0); - localPlayer->imitateEmote(dstBeing, emote); - } + dstBeing->setEmote(emote, 0); + localPlayer->imitateEmote(dstBeing, emote); } if (dstBeing->getType() == ActorType::Player) dstBeing->setOtherTime(); -- cgit v1.2.3-70-g09d2