mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-04-29 07:45:26 +00:00
Allow multiple OCDM per bundle
This commit is contained in:
parent
4dd414589b
commit
fdc87516c1
1 changed files with 9 additions and 3 deletions
|
|
@ -181,9 +181,15 @@ class MiddlewareActor(
|
||||||
|
|
||||||
packet match {
|
packet match {
|
||||||
// Super awkward special case: Bundling CharacterInfoMessage with OCDM causes the character selection
|
// Super awkward special case: Bundling CharacterInfoMessage with OCDM causes the character selection
|
||||||
// to show blank lines and be broken. So we only dequeue either if they are the first packet.
|
// to show blank lines and be broken. So we make sure CharacterInfoMessage is always sent as the only
|
||||||
case _: CharacterInfoMessage | _: ObjectCreateDetailedMessage =>
|
// packet in a bundle.
|
||||||
length == packetLength
|
case _: CharacterInfoMessage =>
|
||||||
|
if (length == packetLength) {
|
||||||
|
length += MTU
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
case _ =>
|
case _ =>
|
||||||
// Some packets may be larger than the MTU limit, in that case we dequeue anyway and split later
|
// Some packets may be larger than the MTU limit, in that case we dequeue anyway and split later
|
||||||
// We deduct some bytes to leave room for SlottedMetaPacket (4 bytes) and MultiPacketEx (2 bytes + prefix per packet)
|
// We deduct some bytes to leave room for SlottedMetaPacket (4 bytes) and MultiPacketEx (2 bytes + prefix per packet)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue