Optimizes larger servers where users are logging in and packets are being created for no reason.
9 lines
270 B
C#
9 lines
270 B
C#
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;
|
|
}
|