summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-08-28 15:15:27 +0000
committerFedja Beader <fedja@protonmail.ch>2024-08-28 15:15:27 +0000
commit7929b1dc48116522b6ed82b05e864a5b15910de9 (patch)
tree9b3af9baa08a9dd500f5dbc8d11b3725420f15f2 /src/net/ea
parente304e3feb771f3e1000addce04e7557f1211192a (diff)
downloadmv-7929b1dc48116522b6ed82b05e864a5b15910de9.tar.gz
mv-7929b1dc48116522b6ed82b05e864a5b15910de9.tar.bz2
mv-7929b1dc48116522b6ed82b05e864a5b15910de9.tar.xz
mv-7929b1dc48116522b6ed82b05e864a5b15910de9.zip
Remove silly msg.read* duplication
& shaves ~5KB from debug binary. previd=""; while read -r line; do if [[ $line =~ .*"msg.read"[^\"]*"\""([^\"]*).* ]]; then id="${BASH_REMATCH[1]}"; if [[ "$id" == "$previd" ]]; then printf "%s\n" "$line"; fi; previd="$id"; fi; done < <(grep -r 'msg.read.*' src/net/) **** mana/plus!91
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/beingrecv.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp
index a618f5aa6..e1990ec86 100644
--- a/src/net/ea/beingrecv.cpp
+++ b/src/net/ea/beingrecv.cpp
@@ -252,15 +252,16 @@ void BeingRecv::processBeingEmotion(Net::MessageIn &msg)
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("being id"));
+
+ const uint8_t emote = msg.readUInt8("emote");
+
if (dstBeing == nullptr)
{
DEBUGLOGSTR("invisible player?");
- msg.readUInt8("emote");
BLOCK_END("BeingRecv::processBeingEmotion")
return;
}
- const uint8_t emote = msg.readUInt8("emote");
if ((emote != 0U) &&
playerRelations.hasPermission(dstBeing, PlayerRelation::EMOTE))
{