1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 06:36:30 +09:00

throw exception on bad delivery method passed to SendMessage

This commit is contained in:
lidgren
2010-06-30 21:10:42 +00:00
parent 2aff5de88e
commit deb1a3b00e
2 changed files with 4 additions and 1 deletions

View File

@@ -623,6 +623,9 @@ namespace Lidgren.Network
throw new NetException("Message has already been sent!");
NetException.Assert(sequenceChannel >= 0 && sequenceChannel < NetConstants.NetChannelsPerDeliveryMethod, "Sequence channel must be between 0 and NetConstants.NetChannelsPerDeliveryMethod (" + NetConstants.NetChannelsPerDeliveryMethod + ")");
if (method <= NetDeliveryMethod.Unknown || method > NetDeliveryMethod.ReliableOrdered)
throw new NetException("Bad delivery method!");
if (m_owner == null)
return false; // we've been disposed