preparing to add full clothes/body part support.
Currently you can: now create new body parts and clothes. edit those clothes and wear them. But currently you will not see most of the edited effects on your own avatar, although often other clients will see those changes on your avatar.tourmaline
parent
42ba071276
commit
ff71d2d4cd
|
@ -1,4 +1,4 @@
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectType>Local</ProjectType>
|
<ProjectType>Local</ProjectType>
|
||||||
<ProductVersion>8.0.50727</ProductVersion>
|
<ProductVersion>8.0.50727</ProductVersion>
|
||||||
|
@ -6,7 +6,8 @@
|
||||||
<ProjectGuid>{7DC4E7C8-89A4-4A8D-9617-3DF262990663}</ProjectGuid>
|
<ProjectGuid>{7DC4E7C8-89A4-4A8D-9617-3DF262990663}</ProjectGuid>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ApplicationIcon></ApplicationIcon>
|
<ApplicationIcon>
|
||||||
|
</ApplicationIcon>
|
||||||
<AssemblyKeyContainerName>
|
<AssemblyKeyContainerName>
|
||||||
</AssemblyKeyContainerName>
|
</AssemblyKeyContainerName>
|
||||||
<AssemblyName>OpenGridServices.ServerConsole</AssemblyName>
|
<AssemblyName>OpenGridServices.ServerConsole</AssemblyName>
|
||||||
|
@ -15,9 +16,11 @@
|
||||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
<DelaySign>false</DelaySign>
|
<DelaySign>false</DelaySign>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder></AppDesignerFolder>
|
<AppDesignerFolder>
|
||||||
|
</AppDesignerFolder>
|
||||||
<RootNamespace>OpenGridServices.ServerConsole</RootNamespace>
|
<RootNamespace>OpenGridServices.ServerConsole</RootNamespace>
|
||||||
<StartupObject></StartupObject>
|
<StartupObject>
|
||||||
|
</StartupObject>
|
||||||
<FileUpgradeFlags>
|
<FileUpgradeFlags>
|
||||||
</FileUpgradeFlags>
|
</FileUpgradeFlags>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -28,7 +31,8 @@
|
||||||
<ConfigurationOverrideFile>
|
<ConfigurationOverrideFile>
|
||||||
</ConfigurationOverrideFile>
|
</ConfigurationOverrideFile>
|
||||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||||
<DocumentationFile></DocumentationFile>
|
<DocumentationFile>
|
||||||
|
</DocumentationFile>
|
||||||
<DebugSymbols>True</DebugSymbols>
|
<DebugSymbols>True</DebugSymbols>
|
||||||
<FileAlignment>4096</FileAlignment>
|
<FileAlignment>4096</FileAlignment>
|
||||||
<Optimize>False</Optimize>
|
<Optimize>False</Optimize>
|
||||||
|
@ -37,7 +41,8 @@
|
||||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<NoWarn></NoWarn>
|
<NoWarn>
|
||||||
|
</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||||
|
@ -46,7 +51,8 @@
|
||||||
<ConfigurationOverrideFile>
|
<ConfigurationOverrideFile>
|
||||||
</ConfigurationOverrideFile>
|
</ConfigurationOverrideFile>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<DocumentationFile></DocumentationFile>
|
<DocumentationFile>
|
||||||
|
</DocumentationFile>
|
||||||
<DebugSymbols>False</DebugSymbols>
|
<DebugSymbols>False</DebugSymbols>
|
||||||
<FileAlignment>4096</FileAlignment>
|
<FileAlignment>4096</FileAlignment>
|
||||||
<Optimize>True</Optimize>
|
<Optimize>True</Optimize>
|
||||||
|
@ -55,25 +61,22 @@
|
||||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<NoWarn></NoWarn>
|
<NoWarn>
|
||||||
|
</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" >
|
<Reference Include="System">
|
||||||
<HintPath>System.dll</HintPath>
|
<HintPath>System.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Data" >
|
<Reference Include="System.Data">
|
||||||
<HintPath>System.Data.dll</HintPath>
|
<HintPath>System.Data.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Xml" >
|
<Reference Include="System.Xml">
|
||||||
<HintPath>System.Xml.dll</HintPath>
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="OpenSim.Framework.dll" >
|
|
||||||
<HintPath>..\bin\OpenSim.Framework.dll</HintPath>
|
|
||||||
<Private>False</Private>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -85,6 +88,12 @@
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
|
||||||
|
<Project>{26E437F6-BA50-44CD-BB44-E911E25CA88C}</Project>
|
||||||
|
<Name>OpenSim.Framework</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
|
@ -92,4 +101,4 @@
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -119,84 +119,89 @@ namespace OpenSim.CAPS
|
||||||
private string ParseREST(string requestBody, string requestURL, string requestMethod)
|
private string ParseREST(string requestBody, string requestURL, string requestMethod)
|
||||||
{
|
{
|
||||||
string responseString = "";
|
string responseString = "";
|
||||||
switch (requestURL)
|
try
|
||||||
{
|
{
|
||||||
case "/Admin/Accounts":
|
switch (requestURL)
|
||||||
if (requestMethod == "GET")
|
{
|
||||||
{
|
case "/Admin/Accounts":
|
||||||
responseString = "<p> Account management </p>";
|
if (requestMethod == "GET")
|
||||||
responseString += "<br> ";
|
|
||||||
responseString += "<p> Create New Account </p>";
|
|
||||||
responseString += NewAccountForm;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "/Admin/Clients":
|
|
||||||
if (requestMethod == "GET")
|
|
||||||
{
|
|
||||||
responseString = " <p> Listing connected Clients </p>" ;
|
|
||||||
OpenSim.world.Avatar TempAv;
|
|
||||||
foreach (libsecondlife.LLUUID UUID in OpenSimRoot.Instance.LocalWorld.Entities.Keys)
|
|
||||||
{
|
{
|
||||||
if (OpenSimRoot.Instance.LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar")
|
responseString = "<p> Account management </p>";
|
||||||
|
responseString += "<br> ";
|
||||||
|
responseString += "<p> Create New Account </p>";
|
||||||
|
responseString += NewAccountForm;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "/Admin/Clients":
|
||||||
|
if (requestMethod == "GET")
|
||||||
|
{
|
||||||
|
responseString = " <p> Listing connected Clients </p>";
|
||||||
|
OpenSim.world.Avatar TempAv;
|
||||||
|
foreach (libsecondlife.LLUUID UUID in OpenSimRoot.Instance.LocalWorld.Entities.Keys)
|
||||||
{
|
{
|
||||||
TempAv = (OpenSim.world.Avatar)OpenSimRoot.Instance.LocalWorld.Entities[UUID];
|
if (OpenSimRoot.Instance.LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar")
|
||||||
responseString += "<p>";
|
{
|
||||||
responseString += String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString());
|
TempAv = (OpenSim.world.Avatar)OpenSimRoot.Instance.LocalWorld.Entities[UUID];
|
||||||
responseString += "</p>";
|
responseString += "<p>";
|
||||||
|
responseString += String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}", TempAv.firstname, TempAv.lastname, UUID, TempAv.ControllingClient.SessionID, TempAv.ControllingClient.CircuitCode, TempAv.ControllingClient.userEP.ToString());
|
||||||
|
responseString += "</p>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case "/Admin/NewAccount":
|
||||||
case "/Admin/NewAccount":
|
if (requestMethod == "POST")
|
||||||
if (requestMethod == "POST")
|
{
|
||||||
{
|
string[] comp = new string[10];
|
||||||
string[] comp = new string[10];
|
string[] passw = new string[3];
|
||||||
string[] passw = new string[3];
|
string delimStr = "&";
|
||||||
string delimStr = "&";
|
char[] delimiter = delimStr.ToCharArray();
|
||||||
char[] delimiter = delimStr.ToCharArray();
|
string delimStr2 = "=";
|
||||||
string delimStr2 = "=";
|
char[] delimiter2 = delimStr2.ToCharArray();
|
||||||
char[] delimiter2 = delimStr2.ToCharArray();
|
|
||||||
|
|
||||||
//Console.WriteLine(requestBody);
|
//Console.WriteLine(requestBody);
|
||||||
comp = requestBody.Split(delimiter);
|
comp = requestBody.Split(delimiter);
|
||||||
passw = comp[3].Split(delimiter2);
|
passw = comp[3].Split(delimiter2);
|
||||||
if (passw[1] == passWord)
|
if (passw[1] == passWord)
|
||||||
{
|
{
|
||||||
responseString = "<p> New Account created </p>";
|
responseString = "<p> New Account created </p>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
responseString = "<p> Admin password is incorrect, please login with the correct password</p>";
|
||||||
|
responseString += "<br><br>" + LoginForm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
break;
|
||||||
|
case "/Admin/Login":
|
||||||
|
if (requestMethod == "POST")
|
||||||
{
|
{
|
||||||
responseString = "<p> Admin password is incorrect, please login with the correct password</p>";
|
// Console.WriteLine(requestBody);
|
||||||
responseString += "<br><br>" + LoginForm;
|
if (requestBody == passWord)
|
||||||
|
{
|
||||||
|
responseString = "<p> Login Successful </p>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
responseString = "<p> Password Error </p>";
|
||||||
|
responseString += "<p> Please Login with the correct password </p>";
|
||||||
|
responseString += "<br><br> " + LoginForm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case "/Admin/Welcome":
|
||||||
}
|
if (requestMethod == "GET")
|
||||||
break;
|
|
||||||
case "/Admin/Login":
|
|
||||||
if (requestMethod == "POST")
|
|
||||||
{
|
|
||||||
Console.WriteLine(requestBody);
|
|
||||||
if (requestBody == passWord)
|
|
||||||
{
|
{
|
||||||
responseString = "<p> Login Successful </p>";
|
responseString = "Welcome to the OpenSim Admin Page";
|
||||||
}
|
responseString += "<br><br><br> " + LoginForm;
|
||||||
else
|
|
||||||
{
|
|
||||||
responseString = "<p> PassWord Error </p>";
|
|
||||||
responseString += "<p> Please Login with the correct password </p>";
|
|
||||||
responseString += "<br><br> " + LoginForm;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case "/Admin/Welcome":
|
|
||||||
if (requestMethod == "GET")
|
|
||||||
{
|
|
||||||
responseString = "Welcome to the OpenSim Admin Page";
|
|
||||||
responseString += "<br><br><br> " + LoginForm;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return responseString;
|
return responseString;
|
||||||
|
@ -210,7 +215,7 @@ namespace OpenSim.CAPS
|
||||||
|
|
||||||
public void HandleRequest(Object stateinfo)
|
public void HandleRequest(Object stateinfo)
|
||||||
{
|
{
|
||||||
// Console.WriteLine("new http incoming");
|
// Console.WriteLine("new http incoming");
|
||||||
HttpListenerContext context = (HttpListenerContext)stateinfo;
|
HttpListenerContext context = (HttpListenerContext)stateinfo;
|
||||||
|
|
||||||
HttpListenerRequest request = context.Request;
|
HttpListenerRequest request = context.Request;
|
||||||
|
@ -265,7 +270,7 @@ namespace OpenSim.CAPS
|
||||||
response.AddHeader("Content-type", "text/html");
|
response.AddHeader("Content-type", "text/html");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
|
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
|
||||||
|
|
|
@ -124,6 +124,15 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
OpenSimRoot.Instance.LocalWorld.GetInitialPrims(this);
|
OpenSimRoot.Instance.LocalWorld.GetInitialPrims(this);
|
||||||
break;
|
break;
|
||||||
|
case PacketType.AgentIsNowWearing:
|
||||||
|
AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack;
|
||||||
|
//Console.WriteLine(Pack.ToString());
|
||||||
|
break;
|
||||||
|
case PacketType.AgentSetAppearance:
|
||||||
|
AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
|
||||||
|
// Console.WriteLine(appear.ToString());
|
||||||
|
this.ClientAvatar.SetAppearance(appear);
|
||||||
|
break;
|
||||||
case PacketType.ObjectAdd:
|
case PacketType.ObjectAdd:
|
||||||
OpenSimRoot.Instance.LocalWorld.AddNewPrim((ObjectAddPacket)Pack, this);
|
OpenSimRoot.Instance.LocalWorld.AddNewPrim((ObjectAddPacket)Pack, this);
|
||||||
break;
|
break;
|
||||||
|
@ -279,7 +288,7 @@ namespace OpenSim
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case PacketType.AssetUploadRequest:
|
case PacketType.AssetUploadRequest:
|
||||||
//this.debug = true;
|
this.debug = true;
|
||||||
AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
|
AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
|
||||||
// Console.WriteLine(Pack.ToString());
|
// Console.WriteLine(Pack.ToString());
|
||||||
// if (request.AssetBlock.Type == 0)
|
// if (request.AssetBlock.Type == 0)
|
||||||
|
@ -318,7 +327,6 @@ namespace OpenSim
|
||||||
OpenSimRoot.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch);
|
OpenSimRoot.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch);
|
||||||
break;
|
break;
|
||||||
case PacketType.UpdateInventoryItem:
|
case PacketType.UpdateInventoryItem:
|
||||||
/*
|
|
||||||
UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack;
|
UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack;
|
||||||
for (int i = 0; i < update.InventoryData.Length; i++)
|
for (int i = 0; i < update.InventoryData.Length; i++)
|
||||||
{
|
{
|
||||||
|
@ -338,7 +346,7 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
break;
|
break;
|
||||||
case PacketType.ViewerEffect:
|
case PacketType.ViewerEffect:
|
||||||
ViewerEffectPacket viewer = (ViewerEffectPacket)Pack;
|
ViewerEffectPacket viewer = (ViewerEffectPacket)Pack;
|
||||||
|
|
|
@ -5,6 +5,7 @@ using System.Text;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using OpenSim.Physics.Manager;
|
using OpenSim.Physics.Manager;
|
||||||
|
using OpenSim.Framework.Inventory;
|
||||||
using Axiom.MathLib;
|
using Axiom.MathLib;
|
||||||
|
|
||||||
namespace OpenSim.world
|
namespace OpenSim.world
|
||||||
|
@ -25,6 +26,9 @@ namespace OpenSim.world
|
||||||
private List<NewForce> forcesList = new List<NewForce>();
|
private List<NewForce> forcesList = new List<NewForce>();
|
||||||
private short _updateCount = 0;
|
private short _updateCount = 0;
|
||||||
private Axiom.MathLib.Quaternion bodyRot;
|
private Axiom.MathLib.Quaternion bodyRot;
|
||||||
|
private LLObject.TextureEntry avatarAppearanceTexture = null;
|
||||||
|
private byte[] visualParams;
|
||||||
|
private AvatarWearable[] Wearables;
|
||||||
private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
|
private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
|
||||||
|
|
||||||
public Avatar(SimClient TheClient)
|
public Avatar(SimClient TheClient)
|
||||||
|
@ -34,6 +38,21 @@ namespace OpenSim.world
|
||||||
localid = 8880000 + (OpenSimRoot.Instance.LocalWorld._localNumber++);
|
localid = 8880000 + (OpenSimRoot.Instance.LocalWorld._localNumber++);
|
||||||
position = new LLVector3(100.0f, 100.0f, 30.0f);
|
position = new LLVector3(100.0f, 100.0f, 30.0f);
|
||||||
position.Z = OpenSimRoot.Instance.LocalWorld.LandMap[(int)position.Y * 256 + (int)position.X] + 1;
|
position.Z = OpenSimRoot.Instance.LocalWorld.LandMap[(int)position.Y * 256 + (int)position.X] + 1;
|
||||||
|
visualParams = new byte[218];
|
||||||
|
for (int i = 0; i < 218; i++)
|
||||||
|
{
|
||||||
|
visualParams[i] = 100;
|
||||||
|
}
|
||||||
|
Wearables = new AvatarWearable[13]; //should be 13 of these
|
||||||
|
for (int i = 0; i < 13; i++)
|
||||||
|
{
|
||||||
|
Wearables[i] = new AvatarWearable();
|
||||||
|
}
|
||||||
|
this.Wearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
|
||||||
|
this.Wearables[0].ItemID = LLUUID.Random();
|
||||||
|
|
||||||
|
this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PhysicsActor PhysActor
|
public PhysicsActor PhysActor
|
||||||
|
@ -97,7 +116,6 @@ namespace OpenSim.world
|
||||||
_updateCount++;
|
_updateCount++;
|
||||||
if (((!PhysicsEngineFlying) && (_updateCount > 3)) || (PhysicsEngineFlying) && (_updateCount > 0))
|
if (((!PhysicsEngineFlying) && (_updateCount > 3)) || (PhysicsEngineFlying) && (_updateCount > 0))
|
||||||
{
|
{
|
||||||
//Console.WriteLine("been a while since update so have one");
|
|
||||||
//It has been a while since last update was sent so lets send one.
|
//It has been a while since last update was sent so lets send one.
|
||||||
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
|
ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
|
||||||
ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
|
ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
|
||||||
|
@ -119,6 +137,7 @@ namespace OpenSim.world
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.positionLastFrame = pos2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetupTemplate(string name)
|
public static void SetupTemplate(string name)
|
||||||
|
@ -204,18 +223,13 @@ namespace OpenSim.world
|
||||||
aw.AgentData.SessionID = ControllingClient.SessionID;
|
aw.AgentData.SessionID = ControllingClient.SessionID;
|
||||||
|
|
||||||
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
|
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
|
||||||
AgentWearablesUpdatePacket.WearableDataBlock awb = new AgentWearablesUpdatePacket.WearableDataBlock();
|
AgentWearablesUpdatePacket.WearableDataBlock awb;
|
||||||
awb.WearableType = (byte)0;
|
for (int i = 0; i < 13; i++)
|
||||||
awb.AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
|
|
||||||
awb.ItemID = LLUUID.Random();
|
|
||||||
aw.WearableData[0] = awb;
|
|
||||||
|
|
||||||
for (int i = 1; i < 13; i++)
|
|
||||||
{
|
{
|
||||||
awb = new AgentWearablesUpdatePacket.WearableDataBlock();
|
awb = new AgentWearablesUpdatePacket.WearableDataBlock();
|
||||||
awb.WearableType = (byte)i;
|
awb.WearableType = (byte)i;
|
||||||
awb.AssetID = new LLUUID("00000000-0000-0000-0000-000000000000");
|
awb.AssetID = this.Wearables[i].AssetID;
|
||||||
awb.ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
|
awb.ItemID = this.Wearables[i].ItemID;
|
||||||
aw.WearableData[i] = awb;
|
aw.WearableData[i] = awb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,14 +267,15 @@ namespace OpenSim.world
|
||||||
avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218];
|
avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218];
|
||||||
//avp.ObjectData.TextureEntry=this.avatar_template.TextureEntry;// br.ReadBytes((int)numBytes);
|
//avp.ObjectData.TextureEntry=this.avatar_template.TextureEntry;// br.ReadBytes((int)numBytes);
|
||||||
|
|
||||||
LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-0000-000000000005"));
|
//LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-0000-000000000005"));
|
||||||
avp.ObjectData.TextureEntry = ntex.ToBytes();
|
//avp.ObjectData.TextureEntry = ntex.ToBytes();
|
||||||
|
avp.ObjectData.TextureEntry = this.avatarAppearanceTexture.ToBytes();
|
||||||
|
|
||||||
AvatarAppearancePacket.VisualParamBlock avblock = null;
|
AvatarAppearancePacket.VisualParamBlock avblock = null;
|
||||||
for (int i = 0; i < 218; i++)
|
for (int i = 0; i < 218; i++)
|
||||||
{
|
{
|
||||||
avblock = new AvatarAppearancePacket.VisualParamBlock();
|
avblock = new AvatarAppearancePacket.VisualParamBlock();
|
||||||
avblock.ParamValue = (byte)100;
|
avblock.ParamValue = visualParams[i];
|
||||||
avp.VisualParam[i] = avblock;
|
avp.VisualParam[i] = avblock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,6 +284,24 @@ namespace OpenSim.world
|
||||||
userInfo.OutPacket(avp);
|
userInfo.OutPacket(avp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public void SetAppearance(AgentSetAppearancePacket appear)
|
||||||
|
{
|
||||||
|
LLObject.TextureEntry tex = new LLObject.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length);
|
||||||
|
this.avatarAppearanceTexture = tex;
|
||||||
|
for (int i = 0; i < appear.VisualParam.Length; i++)
|
||||||
|
{
|
||||||
|
this.visualParams[i] = appear.VisualParam[i].ParamValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values)
|
||||||
|
{
|
||||||
|
if (client.AgentID != ControllingClient.AgentID)
|
||||||
|
{
|
||||||
|
SendAppearanceToOtherAgent(client);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void HandleUpdate(AgentUpdatePacket pack)
|
public void HandleUpdate(AgentUpdatePacket pack)
|
||||||
{
|
{
|
||||||
|
@ -479,7 +512,7 @@ namespace OpenSim.world
|
||||||
int i = 0;
|
int i = 0;
|
||||||
ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
|
ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
|
||||||
|
|
||||||
dat.TextureEntry = AvatarTemplate.TextureEntry;
|
dat.TextureEntry = new byte[0];// AvatarTemplate.TextureEntry;
|
||||||
libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z);
|
libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z);
|
||||||
|
|
||||||
uint ID = this.localid;
|
uint ID = this.localid;
|
||||||
|
|
|
@ -40,11 +40,11 @@ namespace OpenSim
|
||||||
OpenSim.world.Avatar.PhysicsEngineFlying = true;
|
OpenSim.world.Avatar.PhysicsEngineFlying = true;
|
||||||
}
|
}
|
||||||
if (args[i] == "-ode")
|
if (args[i] == "-ode")
|
||||||
{
|
{
|
||||||
sim._physicsEngine = "OpenDynamicsEngine";
|
sim._physicsEngine = "OpenDynamicsEngine";
|
||||||
OpenSim.world.Avatar.PhysicsEngineFlying = true;
|
OpenSim.world.Avatar.PhysicsEngineFlying = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OpenSimRoot.Instance.GridServers = new Grid();
|
OpenSimRoot.Instance.GridServers = new Grid();
|
||||||
|
|
Loading…
Reference in New Issue