aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-03-26 19:05:50 +0000
committerMW2007-03-26 19:05:50 +0000
commitff71d2d4cd82a3a6ded4b5a5246f98ba6db8773a (patch)
treec7095c93ac3ce4e3a294caa0b4144c8cbfd2c0ee
parentAdded a very very very basic Web front end for admin use - ready to be used i... (diff)
downloadopensim-SC_OLD-ff71d2d4cd82a3a6ded4b5a5246f98ba6db8773a.zip
opensim-SC_OLD-ff71d2d4cd82a3a6ded4b5a5246f98ba6db8773a.tar.gz
opensim-SC_OLD-ff71d2d4cd82a3a6ded4b5a5246f98ba6db8773a.tar.bz2
opensim-SC_OLD-ff71d2d4cd82a3a6ded4b5a5246f98ba6db8773a.tar.xz
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.
-rw-r--r--OpenGridServices.ServerConsole/OpenGridServices.ServerConsole.csproj41
-rw-r--r--OpenSim.RegionServer/CAPS/SimHttp.cs143
-rw-r--r--OpenSim.RegionServer/SimClient.cs14
-rw-r--r--OpenSim.RegionServer/world/Avatar.cs61
-rw-r--r--OpenSim/RegionServer.cs10
5 files changed, 162 insertions, 107 deletions
diff --git a/OpenGridServices.ServerConsole/OpenGridServices.ServerConsole.csproj b/OpenGridServices.ServerConsole/OpenGridServices.ServerConsole.csproj
index 49e3306..0cabeb0 100644
--- a/OpenGridServices.ServerConsole/OpenGridServices.ServerConsole.csproj
+++ b/OpenGridServices.ServerConsole/OpenGridServices.ServerConsole.csproj
@@ -1,4 +1,4 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup> 2 <PropertyGroup>
3 <ProjectType>Local</ProjectType> 3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion> 4 <ProductVersion>8.0.50727</ProductVersion>
@@ -6,7 +6,8 @@
6 <ProjectGuid>{7DC4E7C8-89A4-4A8D-9617-3DF262990663}</ProjectGuid> 6 <ProjectGuid>{7DC4E7C8-89A4-4A8D-9617-3DF262990663}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon> 9 <ApplicationIcon>
10 </ApplicationIcon>
10 <AssemblyKeyContainerName> 11 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName> 12 </AssemblyKeyContainerName>
12 <AssemblyName>OpenGridServices.ServerConsole</AssemblyName> 13 <AssemblyName>OpenGridServices.ServerConsole</AssemblyName>
@@ -15,9 +16,11 @@
15 <DefaultTargetSchema>IE50</DefaultTargetSchema> 16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign> 17 <DelaySign>false</DelaySign>
17 <OutputType>Library</OutputType> 18 <OutputType>Library</OutputType>
18 <AppDesignerFolder></AppDesignerFolder> 19 <AppDesignerFolder>
20 </AppDesignerFolder>
19 <RootNamespace>OpenGridServices.ServerConsole</RootNamespace> 21 <RootNamespace>OpenGridServices.ServerConsole</RootNamespace>
20 <StartupObject></StartupObject> 22 <StartupObject>
23 </StartupObject>
21 <FileUpgradeFlags> 24 <FileUpgradeFlags>
22 </FileUpgradeFlags> 25 </FileUpgradeFlags>
23 </PropertyGroup> 26 </PropertyGroup>
@@ -28,7 +31,8 @@
28 <ConfigurationOverrideFile> 31 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile> 32 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants> 33 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile> 34 <DocumentationFile>
35 </DocumentationFile>
32 <DebugSymbols>True</DebugSymbols> 36 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment> 37 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize> 38 <Optimize>False</Optimize>
@@ -37,7 +41,8 @@
37 <RemoveIntegerChecks>False</RemoveIntegerChecks> 41 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 42 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel> 43 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn> 44 <NoWarn>
45 </NoWarn>
41 </PropertyGroup> 46 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 47 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks> 48 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -46,7 +51,8 @@
46 <ConfigurationOverrideFile> 51 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile> 52 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants> 53 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile> 54 <DocumentationFile>
55 </DocumentationFile>
50 <DebugSymbols>False</DebugSymbols> 56 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment> 57 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize> 58 <Optimize>True</Optimize>
@@ -55,25 +61,22 @@
55 <RemoveIntegerChecks>False</RemoveIntegerChecks> 61 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 62 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel> 63 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn> 64 <NoWarn>
65 </NoWarn>
59 </PropertyGroup> 66 </PropertyGroup>
60 <ItemGroup> 67 <ItemGroup>
61 <Reference Include="System" > 68 <Reference Include="System">
62 <HintPath>System.dll</HintPath> 69 <HintPath>System.dll</HintPath>
63 <Private>False</Private> 70 <Private>False</Private>
64 </Reference> 71 </Reference>
65 <Reference Include="System.Data" > 72 <Reference Include="System.Data">
66 <HintPath>System.Data.dll</HintPath> 73 <HintPath>System.Data.dll</HintPath>
67 <Private>False</Private> 74 <Private>False</Private>
68 </Reference> 75 </Reference>
69 <Reference Include="System.Xml" > 76 <Reference Include="System.Xml">
70 <HintPath>System.Xml.dll</HintPath> 77 <HintPath>System.Xml.dll</HintPath>
71 <Private>False</Private> 78 <Private>False</Private>
72 </Reference> 79 </Reference>
73 <Reference Include="OpenSim.Framework.dll" >
74 <HintPath>..\bin\OpenSim.Framework.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 </ItemGroup> 80 </ItemGroup>
78 <ItemGroup> 81 <ItemGroup>
79 </ItemGroup> 82 </ItemGroup>
@@ -85,6 +88,12 @@
85 <SubType>Code</SubType> 88 <SubType>Code</SubType>
86 </Compile> 89 </Compile>
87 </ItemGroup> 90 </ItemGroup>
91 <ItemGroup>
92 <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
93 <Project>{26E437F6-BA50-44CD-BB44-E911E25CA88C}</Project>
94 <Name>OpenSim.Framework</Name>
95 </ProjectReference>
96 </ItemGroup>
88 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> 97 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
89 <PropertyGroup> 98 <PropertyGroup>
90 <PreBuildEvent> 99 <PreBuildEvent>
@@ -92,4 +101,4 @@
92 <PostBuildEvent> 101 <PostBuildEvent>
93 </PostBuildEvent> 102 </PostBuildEvent>
94 </PropertyGroup> 103 </PropertyGroup>
95</Project> 104</Project> \ No newline at end of file
diff --git a/OpenSim.RegionServer/CAPS/SimHttp.cs b/OpenSim.RegionServer/CAPS/SimHttp.cs
index 77c6bb8..c3f4801 100644
--- a/OpenSim.RegionServer/CAPS/SimHttp.cs
+++ b/OpenSim.RegionServer/CAPS/SimHttp.cs
@@ -119,84 +119,89 @@ namespace OpenSim.CAPS
119 private string ParseREST(string requestBody, string requestURL, string requestMethod) 119 private string ParseREST(string requestBody, string requestURL, string requestMethod)
120 { 120 {
121 string responseString = ""; 121 string responseString = "";
122 switch (requestURL) 122 try
123 { 123 {
124 case "/Admin/Accounts": 124 switch (requestURL)
125 if (requestMethod == "GET") 125 {
126 { 126 case "/Admin/Accounts":
127 responseString = "<p> Account management </p>"; 127 if (requestMethod == "GET")
128 responseString += "<br> ";
129 responseString += "<p> Create New Account </p>";
130 responseString += NewAccountForm;
131 }
132 break;
133 case "/Admin/Clients":
134 if (requestMethod == "GET")
135 {
136 responseString = " <p> Listing connected Clients </p>" ;
137 OpenSim.world.Avatar TempAv;
138 foreach (libsecondlife.LLUUID UUID in OpenSimRoot.Instance.LocalWorld.Entities.Keys)
139 { 128 {
140 if (OpenSimRoot.Instance.LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar") 129 responseString = "<p> Account management </p>";
141 { 130 responseString += "<br> ";
142 TempAv = (OpenSim.world.Avatar)OpenSimRoot.Instance.LocalWorld.Entities[UUID]; 131 responseString += "<p> Create New Account </p>";
143 responseString += "<p>"; 132 responseString += NewAccountForm;
144 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());
145 responseString += "</p>";
146 }
147 } 133 }
148 } 134 break;
149 break; 135 case "/Admin/Clients":
150 case "/Admin/NewAccount": 136 if (requestMethod == "GET")
151 if (requestMethod == "POST")
152 {
153 string[] comp = new string[10];
154 string[] passw = new string[3];
155 string delimStr = "&";
156 char[] delimiter = delimStr.ToCharArray();
157 string delimStr2 = "=";
158 char[] delimiter2 = delimStr2.ToCharArray();
159
160 //Console.WriteLine(requestBody);
161 comp = requestBody.Split(delimiter);
162 passw = comp[3].Split(delimiter2);
163 if (passw[1] == passWord)
164 { 137 {
165 responseString = "<p> New Account created </p>"; 138 responseString = " <p> Listing connected Clients </p>";
139 OpenSim.world.Avatar TempAv;
140 foreach (libsecondlife.LLUUID UUID in OpenSimRoot.Instance.LocalWorld.Entities.Keys)
141 {
142 if (OpenSimRoot.Instance.LocalWorld.Entities[UUID].ToString() == "OpenSim.world.Avatar")
143 {
144 TempAv = (OpenSim.world.Avatar)OpenSimRoot.Instance.LocalWorld.Entities[UUID];
145 responseString += "<p>";
146 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());
147 responseString += "</p>";
148 }
149 }
166 } 150 }
167 else 151 break;
152 case "/Admin/NewAccount":
153 if (requestMethod == "POST")
168 { 154 {
169 responseString = "<p> Admin password is incorrect, please login with the correct password</p>"; 155 string[] comp = new string[10];
170 responseString += "<br><br>" + LoginForm; 156 string[] passw = new string[3];
157 string delimStr = "&";
158 char[] delimiter = delimStr.ToCharArray();
159 string delimStr2 = "=";
160 char[] delimiter2 = delimStr2.ToCharArray();
161
162 //Console.WriteLine(requestBody);
163 comp = requestBody.Split(delimiter);
164 passw = comp[3].Split(delimiter2);
165 if (passw[1] == passWord)
166 {
167 responseString = "<p> New Account created </p>";
168 }
169 else
170 {
171 responseString = "<p> Admin password is incorrect, please login with the correct password</p>";
172 responseString += "<br><br>" + LoginForm;
173 }
171 } 174 }
172 175 break;
173 176 case "/Admin/Login":
174 } 177 if (requestMethod == "POST")
175 break;
176 case "/Admin/Login":
177 if (requestMethod == "POST")
178 {
179 Console.WriteLine(requestBody);
180 if (requestBody == passWord)
181 { 178 {
182 responseString = "<p> Login Successful </p>"; 179 // Console.WriteLine(requestBody);
180 if (requestBody == passWord)
181 {
182 responseString = "<p> Login Successful </p>";
183 }
184 else
185 {
186 responseString = "<p> Password Error </p>";
187 responseString += "<p> Please Login with the correct password </p>";
188 responseString += "<br><br> " + LoginForm;
189 }
183 } 190 }
184 else 191 break;
192 case "/Admin/Welcome":
193 if (requestMethod == "GET")
185 { 194 {
186 responseString = "<p> PassWord Error </p>"; 195 responseString = "Welcome to the OpenSim Admin Page";
187 responseString += "<p> Please Login with the correct password </p>"; 196 responseString += "<br><br><br> " + LoginForm;
188 responseString += "<br><br> " + LoginForm;
189 }
190 }
191 break;
192 case "/Admin/Welcome":
193 if (requestMethod == "GET")
194 {
195 responseString = "Welcome to the OpenSim Admin Page";
196 responseString += "<br><br><br> " + LoginForm;
197 197
198 } 198 }
199 break; 199 break;
200 }
201 }
202 catch (Exception e)
203 {
204 Console.WriteLine(e.ToString());
200 } 205 }
201 206
202 return responseString; 207 return responseString;
@@ -210,7 +215,7 @@ namespace OpenSim.CAPS
210 215
211 public void HandleRequest(Object stateinfo) 216 public void HandleRequest(Object stateinfo)
212 { 217 {
213 // Console.WriteLine("new http incoming"); 218 // Console.WriteLine("new http incoming");
214 HttpListenerContext context = (HttpListenerContext)stateinfo; 219 HttpListenerContext context = (HttpListenerContext)stateinfo;
215 220
216 HttpListenerRequest request = context.Request; 221 HttpListenerRequest request = context.Request;
@@ -265,7 +270,7 @@ namespace OpenSim.CAPS
265 response.AddHeader("Content-type", "text/html"); 270 response.AddHeader("Content-type", "text/html");
266 } 271 }
267 break; 272 break;
268 273
269 } 274 }
270 275
271 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString); 276 byte[] buffer = System.Text.Encoding.UTF8.GetBytes(responseString);
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs
index 811e8b8..ef82d98 100644
--- a/OpenSim.RegionServer/SimClient.cs
+++ b/OpenSim.RegionServer/SimClient.cs
@@ -124,6 +124,15 @@ namespace OpenSim
124 } 124 }
125 OpenSimRoot.Instance.LocalWorld.GetInitialPrims(this); 125 OpenSimRoot.Instance.LocalWorld.GetInitialPrims(this);
126 break; 126 break;
127 case PacketType.AgentIsNowWearing:
128 AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack;
129 //Console.WriteLine(Pack.ToString());
130 break;
131 case PacketType.AgentSetAppearance:
132 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
133 // Console.WriteLine(appear.ToString());
134 this.ClientAvatar.SetAppearance(appear);
135 break;
127 case PacketType.ObjectAdd: 136 case PacketType.ObjectAdd:
128 OpenSimRoot.Instance.LocalWorld.AddNewPrim((ObjectAddPacket)Pack, this); 137 OpenSimRoot.Instance.LocalWorld.AddNewPrim((ObjectAddPacket)Pack, this);
129 break; 138 break;
@@ -279,7 +288,7 @@ namespace OpenSim
279 288
280 break; 289 break;
281 case PacketType.AssetUploadRequest: 290 case PacketType.AssetUploadRequest:
282 //this.debug = true; 291 this.debug = true;
283 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; 292 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
284 // Console.WriteLine(Pack.ToString()); 293 // Console.WriteLine(Pack.ToString());
285 // if (request.AssetBlock.Type == 0) 294 // if (request.AssetBlock.Type == 0)
@@ -318,7 +327,6 @@ namespace OpenSim
318 OpenSimRoot.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch); 327 OpenSimRoot.Instance.InventoryCache.FetchInventoryDescendents(this, Fetch);
319 break; 328 break;
320 case PacketType.UpdateInventoryItem: 329 case PacketType.UpdateInventoryItem:
321 /*
322 UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack; 330 UpdateInventoryItemPacket update = (UpdateInventoryItemPacket)Pack;
323 for (int i = 0; i < update.InventoryData.Length; i++) 331 for (int i = 0; i < update.InventoryData.Length; i++)
324 { 332 {
@@ -338,7 +346,7 @@ namespace OpenSim
338 } 346 }
339 } 347 }
340 } 348 }
341 }*/ 349 }
342 break; 350 break;
343 case PacketType.ViewerEffect: 351 case PacketType.ViewerEffect:
344 ViewerEffectPacket viewer = (ViewerEffectPacket)Pack; 352 ViewerEffectPacket viewer = (ViewerEffectPacket)Pack;
diff --git a/OpenSim.RegionServer/world/Avatar.cs b/OpenSim.RegionServer/world/Avatar.cs
index c8a4539..75f2cff 100644
--- a/OpenSim.RegionServer/world/Avatar.cs
+++ b/OpenSim.RegionServer/world/Avatar.cs
@@ -5,6 +5,7 @@ using System.Text;
5using libsecondlife; 5using libsecondlife;
6using libsecondlife.Packets; 6using libsecondlife.Packets;
7using OpenSim.Physics.Manager; 7using OpenSim.Physics.Manager;
8using OpenSim.Framework.Inventory;
8using Axiom.MathLib; 9using Axiom.MathLib;
9 10
10namespace OpenSim.world 11namespace OpenSim.world
@@ -25,6 +26,9 @@ namespace OpenSim.world
25 private List<NewForce> forcesList = new List<NewForce>(); 26 private List<NewForce> forcesList = new List<NewForce>();
26 private short _updateCount = 0; 27 private short _updateCount = 0;
27 private Axiom.MathLib.Quaternion bodyRot; 28 private Axiom.MathLib.Quaternion bodyRot;
29 private LLObject.TextureEntry avatarAppearanceTexture = null;
30 private byte[] visualParams;
31 private AvatarWearable[] Wearables;
28 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); 32 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
29 33
30 public Avatar(SimClient TheClient) 34 public Avatar(SimClient TheClient)
@@ -34,6 +38,21 @@ namespace OpenSim.world
34 localid = 8880000 + (OpenSimRoot.Instance.LocalWorld._localNumber++); 38 localid = 8880000 + (OpenSimRoot.Instance.LocalWorld._localNumber++);
35 position = new LLVector3(100.0f, 100.0f, 30.0f); 39 position = new LLVector3(100.0f, 100.0f, 30.0f);
36 position.Z = OpenSimRoot.Instance.LocalWorld.LandMap[(int)position.Y * 256 + (int)position.X] + 1; 40 position.Z = OpenSimRoot.Instance.LocalWorld.LandMap[(int)position.Y * 256 + (int)position.X] + 1;
41 visualParams = new byte[218];
42 for (int i = 0; i < 218; i++)
43 {
44 visualParams[i] = 100;
45 }
46 Wearables = new AvatarWearable[13]; //should be 13 of these
47 for (int i = 0; i < 13; i++)
48 {
49 Wearables[i] = new AvatarWearable();
50 }
51 this.Wearables[0].AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
52 this.Wearables[0].ItemID = LLUUID.Random();
53
54 this.avatarAppearanceTexture = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
55
37 } 56 }
38 57
39 public PhysicsActor PhysActor 58 public PhysicsActor PhysActor
@@ -97,7 +116,6 @@ namespace OpenSim.world
97 _updateCount++; 116 _updateCount++;
98 if (((!PhysicsEngineFlying) && (_updateCount > 3)) || (PhysicsEngineFlying) && (_updateCount > 0)) 117 if (((!PhysicsEngineFlying) && (_updateCount > 3)) || (PhysicsEngineFlying) && (_updateCount > 0))
99 { 118 {
100 //Console.WriteLine("been a while since update so have one");
101 //It has been a while since last update was sent so lets send one. 119 //It has been a while since last update was sent so lets send one.
102 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock(); 120 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateTerseBlock();
103 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); 121 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
@@ -119,6 +137,7 @@ namespace OpenSim.world
119 } 137 }
120 138
121 } 139 }
140 this.positionLastFrame = pos2;
122 } 141 }
123 142
124 public static void SetupTemplate(string name) 143 public static void SetupTemplate(string name)
@@ -204,18 +223,13 @@ namespace OpenSim.world
204 aw.AgentData.SessionID = ControllingClient.SessionID; 223 aw.AgentData.SessionID = ControllingClient.SessionID;
205 224
206 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; 225 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
207 AgentWearablesUpdatePacket.WearableDataBlock awb = new AgentWearablesUpdatePacket.WearableDataBlock(); 226 AgentWearablesUpdatePacket.WearableDataBlock awb;
208 awb.WearableType = (byte)0; 227 for (int i = 0; i < 13; i++)
209 awb.AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
210 awb.ItemID = LLUUID.Random();
211 aw.WearableData[0] = awb;
212
213 for (int i = 1; i < 13; i++)
214 { 228 {
215 awb = new AgentWearablesUpdatePacket.WearableDataBlock(); 229 awb = new AgentWearablesUpdatePacket.WearableDataBlock();
216 awb.WearableType = (byte)i; 230 awb.WearableType = (byte)i;
217 awb.AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); 231 awb.AssetID = this.Wearables[i].AssetID;
218 awb.ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); 232 awb.ItemID = this.Wearables[i].ItemID;
219 aw.WearableData[i] = awb; 233 aw.WearableData[i] = awb;
220 } 234 }
221 235
@@ -253,14 +267,15 @@ namespace OpenSim.world
253 avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218]; 267 avp.VisualParam = new AvatarAppearancePacket.VisualParamBlock[218];
254 //avp.ObjectData.TextureEntry=this.avatar_template.TextureEntry;// br.ReadBytes((int)numBytes); 268 //avp.ObjectData.TextureEntry=this.avatar_template.TextureEntry;// br.ReadBytes((int)numBytes);
255 269
256 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-0000-000000000005")); 270 //LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-0000-000000000005"));
257 avp.ObjectData.TextureEntry = ntex.ToBytes(); 271 //avp.ObjectData.TextureEntry = ntex.ToBytes();
272 avp.ObjectData.TextureEntry = this.avatarAppearanceTexture.ToBytes();
258 273
259 AvatarAppearancePacket.VisualParamBlock avblock = null; 274 AvatarAppearancePacket.VisualParamBlock avblock = null;
260 for (int i = 0; i < 218; i++) 275 for (int i = 0; i < 218; i++)
261 { 276 {
262 avblock = new AvatarAppearancePacket.VisualParamBlock(); 277 avblock = new AvatarAppearancePacket.VisualParamBlock();
263 avblock.ParamValue = (byte)100; 278 avblock.ParamValue = visualParams[i];
264 avp.VisualParam[i] = avblock; 279 avp.VisualParam[i] = avblock;
265 } 280 }
266 281
@@ -269,6 +284,24 @@ namespace OpenSim.world
269 userInfo.OutPacket(avp); 284 userInfo.OutPacket(avp);
270 285
271 } 286 }
287 public void SetAppearance(AgentSetAppearancePacket appear)
288 {
289 LLObject.TextureEntry tex = new LLObject.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length);
290 this.avatarAppearanceTexture = tex;
291 for (int i = 0; i < appear.VisualParam.Length; i++)
292 {
293 this.visualParams[i] = appear.VisualParam[i].ParamValue;
294 }
295
296 foreach (SimClient client in OpenSimRoot.Instance.ClientThreads.Values)
297 {
298 if (client.AgentID != ControllingClient.AgentID)
299 {
300 SendAppearanceToOtherAgent(client);
301 }
302 }
303 }
304
272 305
273 public void HandleUpdate(AgentUpdatePacket pack) 306 public void HandleUpdate(AgentUpdatePacket pack)
274 { 307 {
@@ -479,7 +512,7 @@ namespace OpenSim.world
479 int i = 0; 512 int i = 0;
480 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock(); 513 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
481 514
482 dat.TextureEntry = AvatarTemplate.TextureEntry; 515 dat.TextureEntry = new byte[0];// AvatarTemplate.TextureEntry;
483 libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z); 516 libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z);
484 517
485 uint ID = this.localid; 518 uint ID = this.localid;
diff --git a/OpenSim/RegionServer.cs b/OpenSim/RegionServer.cs
index 725a7cf..d6d0af9 100644
--- a/OpenSim/RegionServer.cs
+++ b/OpenSim/RegionServer.cs
@@ -40,11 +40,11 @@ namespace OpenSim
40 OpenSim.world.Avatar.PhysicsEngineFlying = true; 40 OpenSim.world.Avatar.PhysicsEngineFlying = true;
41 } 41 }
42 if (args[i] == "-ode") 42 if (args[i] == "-ode")
43 { 43 {
44 sim._physicsEngine = "OpenDynamicsEngine"; 44 sim._physicsEngine = "OpenDynamicsEngine";
45 OpenSim.world.Avatar.PhysicsEngineFlying = true; 45 OpenSim.world.Avatar.PhysicsEngineFlying = true;
46 } 46 }
47 } 47 }
48 48
49 49
50 OpenSimRoot.Instance.GridServers = new Grid(); 50 OpenSimRoot.Instance.GridServers = new Grid();