From c64039363daf90b37ddbeaa95b2516f0020c3f06 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 26 Apr 2007 12:56:14 +0000 Subject: Mostly working again. Updated to lastest libsl and handled the changes to the message templates (some byte fields are now ushort fields ). Still seems to be a problem when logging on, in that I get the downloading clothing message at the end of the precaching (which I didn't before) --- OpenSim.Framework/Types/PrimData.cs | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'OpenSim.Framework') diff --git a/OpenSim.Framework/Types/PrimData.cs b/OpenSim.Framework/Types/PrimData.cs index 9b41a12..6c9bb83 100644 --- a/OpenSim.Framework/Types/PrimData.cs +++ b/OpenSim.Framework/Types/PrimData.cs @@ -11,20 +11,20 @@ namespace OpenSim.Framework.Types public LLUUID OwnerID; public byte PCode; - public byte PathBegin; - public byte PathEnd; + public ushort PathBegin; + public ushort PathEnd; public byte PathScaleX; public byte PathScaleY; public byte PathShearX; public byte PathShearY; public sbyte PathSkew; - public byte ProfileBegin; - public byte ProfileEnd; + public ushort ProfileBegin; + public ushort ProfileEnd; public LLVector3 Scale; public byte PathCurve; public byte ProfileCurve; public uint ParentID = 0; - public byte ProfileHollow; + public ushort ProfileHollow; public sbyte PathRadiusOffset; public byte PathRevolutions; public sbyte PathTaperX; @@ -58,20 +58,20 @@ namespace OpenSim.Framework.Types this.OwnerID = new LLUUID(data, i); i += 16; this.PCode = data[i++]; - this.PathBegin = data[i++]; - this.PathEnd = data[i++]; + this.PathBegin = (ushort)(data[i++] + (data[i++] << 8)); + this.PathEnd = (ushort)(data[i++] + (data[i++] << 8)); this.PathScaleX = data[i++]; this.PathScaleY = data[i++]; this.PathShearX = data[i++]; this.PathShearY = data[i++]; this.PathSkew = (sbyte)data[i++]; - this.ProfileBegin = data[i++]; - this.ProfileEnd = data[i++]; + this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8)); + this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8)); this.Scale = new LLVector3(data, i); i += 12; this.PathCurve = data[i++]; this.ProfileCurve = data[i++]; this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); - this.ProfileHollow = data[i++]; + this.ProfileHollow = (ushort)(data[i++] + (data[i++] << 8)); this.PathRadiusOffset = (sbyte)data[i++]; this.PathRevolutions = data[i++]; this.PathTaperX = (sbyte)data[i++]; @@ -100,15 +100,19 @@ namespace OpenSim.Framework.Types byte[] bytes = new byte[121 + Texture.Length]; Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16; bytes[i++] = this.PCode; - bytes[i++] = this.PathBegin; - bytes[i++] = this.PathEnd; + bytes[i++] = (byte)(this.PathBegin % 256); + bytes[i++] = (byte)((this.PathBegin >> 8) % 256); + bytes[i++] = (byte)(this.PathEnd % 256); + bytes[i++] = (byte)((this.PathEnd >> 8) % 256); bytes[i++] = this.PathScaleX; bytes[i++] = this.PathScaleY; bytes[i++] = this.PathShearX; bytes[i++] = this.PathShearY; bytes[i++] = (byte)this.PathSkew; - bytes[i++] = this.ProfileBegin; - bytes[i++] = this.ProfileEnd; + bytes[i++] = (byte)(this.ProfileBegin % 256); + bytes[i++] = (byte)((this.ProfileBegin >> 8) % 256); + bytes[i++] = (byte)(this.ProfileEnd % 256); + bytes[i++] = (byte)((this.ProfileEnd >> 8) % 256); Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12; bytes[i++] = this.PathCurve; bytes[i++] = this.ProfileCurve; @@ -116,7 +120,8 @@ namespace OpenSim.Framework.Types bytes[i++] = (byte)((ParentID >> 8) % 256); bytes[i++] = (byte)((ParentID >> 16) % 256); bytes[i++] = (byte)((ParentID >> 24) % 256); - bytes[i++] = this.ProfileHollow; + bytes[i++] = (byte)(this.ProfileHollow %256); + bytes[i++] = (byte)((this.ProfileHollow >> 8)% 256); bytes[i++] = ((byte)this.PathRadiusOffset); bytes[i++] = this.PathRevolutions; bytes[i++] = ((byte) this.PathTaperX); -- cgit v1.1