Misc minor fixes

This commit is contained in:
Anuken
2022-05-28 07:48:43 -04:00
parent 0e4903910b
commit 55a219fc03
4 changed files with 11 additions and 5 deletions

View File

@@ -144,7 +144,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
int length = writeBuffer.position();
writeBuffer.flip();
snet.sendP2PPacket(currentServer, writeBuffer, reliable || length >= 1200 ? P2PSend.Reliable : P2PSend.UnreliableNoDelay, 0);
snet.sendP2PPacket(currentServer, writeBuffer, reliable || length >= 1000 ? P2PSend.Reliable : P2PSend.UnreliableNoDelay, 0);
}catch(Exception e){
net.showError(e);
}
@@ -419,7 +419,7 @@ public class SNet implements SteamNetworkingCallback, SteamMatchmakingCallback,
int length = writeBuffer.position();
writeBuffer.flip();
snet.sendP2PPacket(sid, writeBuffer, reliable || length >= 1200 ? object instanceof StreamChunk ? P2PSend.ReliableWithBuffering : P2PSend.Reliable : P2PSend.UnreliableNoDelay, 0);
snet.sendP2PPacket(sid, writeBuffer, reliable || length >= 1000 ? object instanceof StreamChunk ? P2PSend.ReliableWithBuffering : P2PSend.Reliable : P2PSend.UnreliableNoDelay, 0);
}catch(Exception e){
Log.err(e);
Log.info("Error sending packet. Disconnecting invalid client!");