fix: Stops creating blocked packets entirely (#944)
Optimizes larger servers where users are logging in and packets are being created for no reason.
This commit is contained in:
parent
5db8b1354c
commit
941452de4a
58 changed files with 5510 additions and 5537 deletions
9
Projects/Server/Network/Packets/OutgoingPackets.cs
Normal file
9
Projects/Server/Network/Packets/OutgoingPackets.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Server.Network;
|
||||
|
||||
public static class OutgoingPackets
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool CannotSendPackets(this NetState ns) => ns?.Connection == null || ns.BlockAllPackets;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue