Skip to content

Commit

Permalink
refactor: refactoring networksystem access
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Jun 27, 2024
1 parent d512b22 commit 502a978
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/levioptimize/features/PacketSenderOpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ LL_TYPE_INSTANCE_HOOK(
if (ids.empty()) {
return;
}
auto& networkSystem = ll::memory::dAccess<NetworkSystem>(&mNetwork.toServerNetworkSystem(), 24);

BinaryStream pktstream;
pktstream.write("\0\0\0\0\0", 5);
packet.write(pktstream);
Expand All @@ -125,8 +127,7 @@ LL_TYPE_INSTANCE_HOOK(
.size = res.size() - 5 + size,
.cap = res.capacity() > 16 ? res.capacity() : 16
};
ll::memory::dAccess<NetworkSystem>(&mNetwork.toServerNetworkSystem(), 24)
._sendInternal(id.mIdentifier, packet, *(std::string*)(&datas));
networkSystem._sendInternal(id.mIdentifier, packet, *(std::string*)(&datas));
}
}

Expand Down

0 comments on commit 502a978

Please sign in to comment.