You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-17 15:46:33 +09:00
throw explanatory exception if trying to register callback with no sycnhronizationcontext
This commit is contained in:
@@ -274,13 +274,12 @@ namespace Lidgren.Network
|
||||
|
||||
if ((m_readPosition & 7) == 0) // read directly
|
||||
{
|
||||
// endianness is handled inside BitConverter.ToSingle
|
||||
float retval = BitConverter.ToSingle(m_data, m_readPosition >> 3);
|
||||
return retval;
|
||||
}
|
||||
|
||||
byte[] bytes = PeekBytes(4);
|
||||
return BitConverter.ToSingle(bytes, 0); // endianness is handled inside BitConverter.ToSingle
|
||||
return BitConverter.ToSingle(bytes, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -298,7 +297,7 @@ namespace Lidgren.Network
|
||||
}
|
||||
|
||||
byte[] bytes = PeekBytes(8);
|
||||
return BitConverter.ToDouble(bytes, 0); // endianness is handled inside BitConverter.ToSingle
|
||||
return BitConverter.ToDouble(bytes, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user