You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-16 07:06:30 +09:00
throw explanatory exception if trying to register callback with no sycnhronizationcontext
This commit is contained in:
@@ -334,14 +334,13 @@ 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);
|
||||
m_readPosition += 32;
|
||||
return retval;
|
||||
}
|
||||
|
||||
byte[] bytes = ReadBytes(4);
|
||||
return BitConverter.ToSingle(bytes, 0); // endianness is handled inside BitConverter.ToSingle
|
||||
return BitConverter.ToSingle(bytes, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -360,7 +359,7 @@ namespace Lidgren.Network
|
||||
}
|
||||
|
||||
byte[] bytes = ReadBytes(8);
|
||||
return BitConverter.ToDouble(bytes, 0); // endianness is handled inside BitConverter.ToSingle
|
||||
return BitConverter.ToDouble(bytes, 0);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user