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)
0.1-prestable
MW 2007-04-26 12:56:14 +00:00
parent f06d0f1047
commit c64039363d
7 changed files with 152 additions and 168 deletions

View File

@ -11,20 +11,20 @@ namespace OpenSim.Framework.Types
public LLUUID OwnerID; public LLUUID OwnerID;
public byte PCode; public byte PCode;
public byte PathBegin; public ushort PathBegin;
public byte PathEnd; public ushort PathEnd;
public byte PathScaleX; public byte PathScaleX;
public byte PathScaleY; public byte PathScaleY;
public byte PathShearX; public byte PathShearX;
public byte PathShearY; public byte PathShearY;
public sbyte PathSkew; public sbyte PathSkew;
public byte ProfileBegin; public ushort ProfileBegin;
public byte ProfileEnd; public ushort ProfileEnd;
public LLVector3 Scale; public LLVector3 Scale;
public byte PathCurve; public byte PathCurve;
public byte ProfileCurve; public byte ProfileCurve;
public uint ParentID = 0; public uint ParentID = 0;
public byte ProfileHollow; public ushort ProfileHollow;
public sbyte PathRadiusOffset; public sbyte PathRadiusOffset;
public byte PathRevolutions; public byte PathRevolutions;
public sbyte PathTaperX; public sbyte PathTaperX;
@ -58,20 +58,20 @@ namespace OpenSim.Framework.Types
this.OwnerID = new LLUUID(data, i); i += 16; this.OwnerID = new LLUUID(data, i); i += 16;
this.PCode = data[i++]; this.PCode = data[i++];
this.PathBegin = data[i++]; this.PathBegin = (ushort)(data[i++] + (data[i++] << 8));
this.PathEnd = data[i++]; this.PathEnd = (ushort)(data[i++] + (data[i++] << 8));
this.PathScaleX = data[i++]; this.PathScaleX = data[i++];
this.PathScaleY = data[i++]; this.PathScaleY = data[i++];
this.PathShearX = data[i++]; this.PathShearX = data[i++];
this.PathShearY = data[i++]; this.PathShearY = data[i++];
this.PathSkew = (sbyte)data[i++]; this.PathSkew = (sbyte)data[i++];
this.ProfileBegin = data[i++]; this.ProfileBegin = (ushort)(data[i++] + (data[i++] << 8));
this.ProfileEnd = data[i++]; this.ProfileEnd = (ushort)(data[i++] + (data[i++] << 8));
this.Scale = new LLVector3(data, i); i += 12; this.Scale = new LLVector3(data, i); i += 12;
this.PathCurve = data[i++]; this.PathCurve = data[i++];
this.ProfileCurve = data[i++]; this.ProfileCurve = data[i++];
this.ParentID = (uint)(data[i++] + (data[i++] << 8) + (data[i++] << 16) + (data[i++] << 24)); 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.PathRadiusOffset = (sbyte)data[i++];
this.PathRevolutions = data[i++]; this.PathRevolutions = data[i++];
this.PathTaperX = (sbyte)data[i++]; this.PathTaperX = (sbyte)data[i++];
@ -100,15 +100,19 @@ namespace OpenSim.Framework.Types
byte[] bytes = new byte[121 + Texture.Length]; byte[] bytes = new byte[121 + Texture.Length];
Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16; Array.Copy(OwnerID.GetBytes(), 0, bytes, i, 16); i += 16;
bytes[i++] = this.PCode; bytes[i++] = this.PCode;
bytes[i++] = this.PathBegin; bytes[i++] = (byte)(this.PathBegin % 256);
bytes[i++] = this.PathEnd; 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.PathScaleX;
bytes[i++] = this.PathScaleY; bytes[i++] = this.PathScaleY;
bytes[i++] = this.PathShearX; bytes[i++] = this.PathShearX;
bytes[i++] = this.PathShearY; bytes[i++] = this.PathShearY;
bytes[i++] = (byte)this.PathSkew; bytes[i++] = (byte)this.PathSkew;
bytes[i++] = this.ProfileBegin; bytes[i++] = (byte)(this.ProfileBegin % 256);
bytes[i++] = this.ProfileEnd; 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; Array.Copy(Scale.GetBytes(), 0, bytes, i, 12); i += 12;
bytes[i++] = this.PathCurve; bytes[i++] = this.PathCurve;
bytes[i++] = this.ProfileCurve; bytes[i++] = this.ProfileCurve;
@ -116,7 +120,8 @@ namespace OpenSim.Framework.Types
bytes[i++] = (byte)((ParentID >> 8) % 256); bytes[i++] = (byte)((ParentID >> 8) % 256);
bytes[i++] = (byte)((ParentID >> 16) % 256); bytes[i++] = (byte)((ParentID >> 16) % 256);
bytes[i++] = (byte)((ParentID >> 24) % 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++] = ((byte)this.PathRadiusOffset);
bytes[i++] = this.PathRevolutions; bytes[i++] = this.PathRevolutions;
bytes[i++] = ((byte) this.PathTaperX); bytes[i++] = ((byte) this.PathTaperX);

View File

@ -111,8 +111,19 @@ namespace OpenSim.world
br.Close(); br.Close();
fStream.Close(); fStream.Close();
libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock objdata = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i); libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock(); // new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
SetDefaultPacketValues(objdata);
objdata.ObjectData = data1;
objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24);
objdata.PathCurve = 16;
objdata.ProfileCurve = 1;
objdata.PathScaleX = 100;
objdata.PathScaleY = 100;
objdata.ParentID = 0;
objdata.OwnerID = LLUUID.Zero;
objdata.Scale = new LLVector3(1, 1, 1);
objdata.PCode = 47;
System.Text.Encoding enc = System.Text.Encoding.ASCII; System.Text.Encoding enc = System.Text.Encoding.ASCII;
libsecondlife.LLVector3 pos = new LLVector3(objdata.ObjectData, 16); libsecondlife.LLVector3 pos = new LLVector3(objdata.ObjectData, 16);
pos.X = 100f; pos.X = 100f;
@ -126,6 +137,29 @@ namespace OpenSim.world
Avatar.AvatarTemplate = objdata; Avatar.AvatarTemplate = objdata;
} }
protected static void SetDefaultPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata)
{
objdata.PSBlock = new byte[0];
objdata.ExtraParams = new byte[1];
objdata.MediaURL = new byte[0];
objdata.NameValue = new byte[0];
objdata.Text = new byte[0];
objdata.TextColor = new byte[4];
objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0);
objdata.JointPivot = new LLVector3(0, 0, 0);
objdata.Material = 4;
objdata.TextureAnim = new byte[0];
objdata.Sound = LLUUID.Zero;
LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
objdata.TextureEntry = ntex.ToBytes();
objdata.State = 0;
objdata.Data = new byte[0];
objdata.ObjectData = new byte[60];
objdata.ObjectData[46] = 128;
objdata.ObjectData[47] = 63;
}
public void CompleteMovement(World RegionInfo) public void CompleteMovement(World RegionInfo)
{ {
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Avatar.cs:CompleteMovement() - Constructing AgentMovementComplete packet");

View File

@ -124,9 +124,9 @@ namespace OpenSim.world
objupdate.RegionData.RegionHandle = m_regionHandle; objupdate.RegionData.RegionHandle = m_regionHandle;
objupdate.RegionData.TimeDilation = 64096; objupdate.RegionData.TimeDilation = 64096;
objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1]; objupdate.ObjectData = new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock[1];
objupdate.ObjectData[0] = AvatarTemplate; objupdate.ObjectData[0] = AvatarTemplate;
//give this avatar object a local id and assign the user a name //give this avatar object a local id and assign the user a name
objupdate.ObjectData[0].ID = this.localid; objupdate.ObjectData[0].ID = this.localid;
this.uuid = objupdate.ObjectData[0].FullID = ControllingClient.AgentID; this.uuid = objupdate.ObjectData[0].FullID = ControllingClient.AgentID;
objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstname + "\nLastName STRING RW SV " + lastname + " \0"); objupdate.ObjectData[0].NameValue = _enc.GetBytes("FirstName STRING RW SV " + firstname + "\nLastName STRING RW SV " + lastname + " \0");
@ -134,7 +134,6 @@ namespace OpenSim.world
byte[] pb = pos2.GetBytes(); byte[] pb = pos2.GetBytes();
Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length); Array.Copy(pb, 0, objupdate.ObjectData[0].ObjectData, 16, pb.Length);
m_world._localNumber++; m_world._localNumber++;
foreach (SimClient client in m_clientThreads.Values) foreach (SimClient client in m_clientThreads.Values)
{ {
client.OutPacket(objupdate); client.OutPacket(objupdate);

View File

@ -70,7 +70,7 @@ namespace OpenSim.world
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap");
TerrainManager = new TerrainManager(new SecondLife()); TerrainManager = new TerrainManager(new SecondLife());
Terrain = new TerrainEngine(); Terrain = new TerrainEngine();
Avatar.SetupTemplate("avatar-template.dat"); Avatar.SetupTemplate("avatar-template2.dat");
// MainConsole.Instance.WriteLine("World.cs - Creating script engine instance"); // MainConsole.Instance.WriteLine("World.cs - Creating script engine instance");
// Initialise this only after the world has loaded // Initialise this only after the world has loaded
// Scripts = new ScriptEngine(this); // Scripts = new ScriptEngine(this);

View File

@ -1,7 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00 Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005 # Visual C# Express 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Terrain.BasicTerrain", "OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj", "{2270B8FE-0000-0000-0000-000000000000}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.RegionServer", "OpenSim.RegionServer\OpenSim.RegionServer.csproj", "{632E1BFD-0000-0000-0000-000000000000}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.RegionServer", "OpenSim.RegionServer\OpenSim.RegionServer.csproj", "{632E1BFD-0000-0000-0000-000000000000}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.OdePlugin", "OpenSim.Physics\OdePlugin\OpenSim.Physics.OdePlugin.csproj", "{63A05FE9-0000-0000-0000-000000000000}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.OdePlugin", "OpenSim.Physics\OdePlugin\OpenSim.Physics.OdePlugin.csproj", "{63A05FE9-0000-0000-0000-000000000000}"
@ -49,59 +47,7 @@ Global
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
({632E1BFD-0000-0000-0000-000000000000}).5 = ({2270B8FE-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).8 = ({E88EF749-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).9 = ({8BE16150-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).10 = ({8BB20F0A-0000-0000-0000-000000000000})
({632E1BFD-0000-0000-0000-000000000000}).11 = ({8E81D43C-0000-0000-0000-000000000000})
({63A05FE9-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
({EE9E5D96-0000-0000-0000-000000000000}).6 = ({8ACA2445-0000-0000-0000-000000000000})
({EE9E5D96-0000-0000-0000-000000000000}).7 = ({A7CD0630-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).7 = ({8BE16150-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).8 = ({8BB20F0A-0000-0000-0000-000000000000})
({438A9556-0000-0000-0000-000000000000}).9 = ({632E1BFD-0000-0000-0000-000000000000})
({E88EF749-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({8BE16150-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({8BE16150-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).5 = ({8BB20F0A-0000-0000-0000-000000000000})
({66591469-0000-0000-0000-000000000000}).8 = ({8E81D43C-0000-0000-0000-000000000000})
({4F874463-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
({B0027747-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
({B0027747-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
({8BB20F0A-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
({988F0AC4-0000-0000-0000-000000000000}).3 = ({8BE16150-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({B55C0B5D-0000-0000-0000-000000000000}).5 = ({8E81D43C-0000-0000-0000-000000000000})
({8ACA2445-0000-0000-0000-000000000000}).4 = ({8E81D43C-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).5 = ({8BB20F0A-0000-0000-0000-000000000000})
({21BFC8E2-0000-0000-0000-000000000000}).8 = ({8E81D43C-0000-0000-0000-000000000000})
({E1B79ECF-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
({E1B79ECF-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
({6B20B603-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
({6B20B603-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
({7E494328-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
({7E494328-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
({97A82740-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
({546099CD-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
({546099CD-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2270B8FE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU {632E1BFD-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU {632E1BFD-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU

BIN
bin/avatar-template2.dat Normal file

Binary file not shown.

Binary file not shown.