more eventqueue endian madness
parent
5cef64f564
commit
3465447e17
|
@ -55,15 +55,11 @@ namespace OpenSim.Region.Environment
|
||||||
|
|
||||||
private static byte[] uintToByteArray(uint uIntValue)
|
private static byte[] uintToByteArray(uint uIntValue)
|
||||||
{
|
{
|
||||||
// Reverse endianness of a uint
|
byte[] resultbytes = Utils.UIntToBytes(uIntValue);
|
||||||
return new byte[]
|
if (BitConverter.IsLittleEndian)
|
||||||
{
|
Array.Reverse(resultbytes);
|
||||||
(byte)((uIntValue >> 24) % 256),
|
|
||||||
(byte)((uIntValue >> 16) % 256),
|
|
||||||
(byte)((uIntValue >> 8) % 256),
|
|
||||||
(byte)(uIntValue % 256)
|
|
||||||
|
|
||||||
};
|
return resultbytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static OSD buildEvent(string eventName, OSD eventBody)
|
public static OSD buildEvent(string eventName, OSD eventBody)
|
||||||
|
@ -359,7 +355,7 @@ namespace OpenSim.Region.Environment
|
||||||
parcelDataMap.Add("AABBMin", AABBMin);
|
parcelDataMap.Add("AABBMin", AABBMin);
|
||||||
|
|
||||||
parcelDataMap.Add("Area", OSD.FromInteger(parcelPropertiesPacket.ParcelData.Area));
|
parcelDataMap.Add("Area", OSD.FromInteger(parcelPropertiesPacket.ParcelData.Area));
|
||||||
parcelDataMap.Add("AuctionID", OSD.FromBinary(parcelPropertiesPacket.ParcelData.AuctionID));
|
parcelDataMap.Add("AuctionID", OSD.FromBinary(uintToByteArray(parcelPropertiesPacket.ParcelData.AuctionID)));
|
||||||
parcelDataMap.Add("AuthBuyerID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.AuthBuyerID));
|
parcelDataMap.Add("AuthBuyerID", OSD.FromUUID(parcelPropertiesPacket.ParcelData.AuthBuyerID));
|
||||||
parcelDataMap.Add("Bitmap", OSD.FromBinary(parcelPropertiesPacket.ParcelData.Bitmap));
|
parcelDataMap.Add("Bitmap", OSD.FromBinary(parcelPropertiesPacket.ParcelData.Bitmap));
|
||||||
parcelDataMap.Add("Category", OSD.FromInteger((int)parcelPropertiesPacket.ParcelData.Category));
|
parcelDataMap.Add("Category", OSD.FromInteger((int)parcelPropertiesPacket.ParcelData.Category));
|
||||||
|
|
Loading…
Reference in New Issue