aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj12
-rw-r--r--OpenSim/OpenSim.RegionServer/RegionInfo.cs147
-rw-r--r--OpenSim/OpenSim.World/OpenSim.World.csproj10
-rw-r--r--OpenSim/OpenSim.World/Primitive2.cs491
-rw-r--r--OpenSim/OpenSim/OpenSim.csproj71
5 files changed, 49 insertions, 682 deletions
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
index 2c61026..b7cea3a 100644
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
+++ b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
@@ -69,7 +69,6 @@
69 <HintPath>System.dll</HintPath> 69 <HintPath>System.dll</HintPath>
70 <Private>False</Private> 70 <Private>False</Private>
71 </Reference> 71 </Reference>
72 <Reference Include="System.Data" />
73 <Reference Include="System.Xml"> 72 <Reference Include="System.Xml">
74 <HintPath>System.Xml.dll</HintPath> 73 <HintPath>System.Xml.dll</HintPath>
75 <Private>False</Private> 74 <Private>False</Private>
@@ -162,7 +161,12 @@
162 <Compile Include="CommsManager.cs"> 161 <Compile Include="CommsManager.cs">
163 <SubType>Code</SubType> 162 <SubType>Code</SubType>
164 </Compile> 163 </Compile>
165 <Compile Include="OpenSimNetworkHandler.cs" /> 164 <Compile Include="NetworkServersInfo.cs">
165 <SubType>Code</SubType>
166 </Compile>
167 <Compile Include="OpenSimNetworkHandler.cs">
168 <SubType>Code</SubType>
169 </Compile>
166 <Compile Include="PacketServer.cs"> 170 <Compile Include="PacketServer.cs">
167 <SubType>Code</SubType> 171 <SubType>Code</SubType>
168 </Compile> 172 </Compile>
@@ -172,7 +176,9 @@
172 <Compile Include="UDPServer.cs"> 176 <Compile Include="UDPServer.cs">
173 <SubType>Code</SubType> 177 <SubType>Code</SubType>
174 </Compile> 178 </Compile>
175 <Compile Include="UserConfigUtility.cs" /> 179 <Compile Include="UserConfigUtility.cs">
180 <SubType>Code</SubType>
181 </Compile>
176 <Compile Include="VersionInfo.cs"> 182 <Compile Include="VersionInfo.cs">
177 <SubType>Code</SubType> 183 <SubType>Code</SubType>
178 </Compile> 184 </Compile>
diff --git a/OpenSim/OpenSim.RegionServer/RegionInfo.cs b/OpenSim/OpenSim.RegionServer/RegionInfo.cs
deleted file mode 100644
index d148d0f..0000000
--- a/OpenSim/OpenSim.RegionServer/RegionInfo.cs
+++ /dev/null
@@ -1,147 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Net;
5using System.Web;
6using System.IO;
7using OpenSim.Framework.Interfaces;
8using OpenSim.Framework.Utilities;
9using libsecondlife;
10using OpenSim.Framework.Types;
11
12namespace OpenSim
13{
14 public class RegionInfo : RegionInfoBase
15 {
16
17 private bool isSandbox;
18
19 public string DataStore;
20
21 public RegionInfo()
22 {
23
24 }
25
26 public void InitConfig(bool sandboxMode, IGenericConfig configData)
27 {
28 this.isSandbox = sandboxMode;
29 try
30 {
31 // Sim UUID
32 string attri = "";
33 attri = configData.GetAttribute("SimUUID");
34 if (attri == "")
35 {
36 this.SimUUID = LLUUID.Random();
37 configData.SetAttribute("SimUUID", this.SimUUID.ToString());
38 }
39 else
40 {
41 this.SimUUID = new LLUUID(attri);
42 }
43
44 // Sim name
45 attri = "";
46 attri = configData.GetAttribute("SimName");
47 if (attri == "")
48 {
49 this.RegionName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Name", "OpenSim test");
50 configData.SetAttribute("SimName", this.RegionName);
51 }
52 else
53 {
54 this.RegionName = attri;
55 }
56 // Sim/Grid location X
57 attri = "";
58 attri = configData.GetAttribute("SimLocationX");
59 if (attri == "")
60 {
61 string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X", "997");
62 configData.SetAttribute("SimLocationX", location);
63 this.RegionLocX = (uint)Convert.ToUInt32(location);
64 }
65 else
66 {
67 this.RegionLocX = (uint)Convert.ToUInt32(attri);
68 }
69 // Sim/Grid location Y
70 attri = "";
71 attri = configData.GetAttribute("SimLocationY");
72 if (attri == "")
73 {
74 string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y", "996");
75 configData.SetAttribute("SimLocationY", location);
76 this.RegionLocY = (uint)Convert.ToUInt32(location);
77 }
78 else
79 {
80 this.RegionLocY = (uint)Convert.ToUInt32(attri);
81 }
82
83 // Local storage datastore
84 attri = "";
85 attri = configData.GetAttribute("Datastore");
86 if (attri == "")
87 {
88 string datastore = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Filename for local storage", "localworld.yap");
89 configData.SetAttribute("Datastore", datastore);
90 this.DataStore = datastore;
91 }
92 else
93 {
94 this.DataStore = attri;
95 }
96
97 //Sim Listen Port
98 attri = "";
99 attri = configData.GetAttribute("SimListenPort");
100 if (attri == "")
101 {
102 string port = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("UDP port for client connections", "9000");
103 configData.SetAttribute("SimListenPort", port);
104 this.IPListenPort = Convert.ToInt32(port);
105 }
106 else
107 {
108 this.IPListenPort = Convert.ToInt32(attri);
109 }
110 //Sim Listen Address
111 attri = "";
112 attri = configData.GetAttribute("SimListenAddress");
113 if (attri == "")
114 {
115 this.IPListenAddr = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("IP Address to listen on for client connections", "127.0.0.1");
116 configData.SetAttribute("SimListenAddress", this.IPListenAddr);
117 }
118 else
119 {
120 this.IPListenAddr = attri;
121 }
122
123
124 this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
125
126 configData.Commit();
127 }
128 catch (Exception e)
129 {
130 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Config.cs:InitConfig() - Exception occured");
131 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
132 }
133
134 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Sim settings loaded:");
135 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "UUID: " + this.SimUUID.ToStringHyphenated());
136 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Name: " + this.RegionName);
137 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]");
138 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Handle: " + this.RegionHandle.ToString());
139 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort);
140 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Sandbox Mode? " + isSandbox.ToString());
141 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Asset URL: " + this.AssetURL);
142 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Asset key: " + this.AssetSendKey);
143 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Grid URL: " + this.GridURL);
144 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Grid key: " + this.GridSendKey);
145 }
146 }
147}
diff --git a/OpenSim/OpenSim.World/OpenSim.World.csproj b/OpenSim/OpenSim.World/OpenSim.World.csproj
index 78025d3..6cda518 100644
--- a/OpenSim/OpenSim.World/OpenSim.World.csproj
+++ b/OpenSim/OpenSim.World/OpenSim.World.csproj
@@ -87,10 +87,6 @@
87 </Reference> 87 </Reference>
88 </ItemGroup> 88 </ItemGroup>
89 <ItemGroup> 89 <ItemGroup>
90 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
91 <Project>{C9702041-922C-452A-A1B4-7880AF53149A}</Project>
92 <Name>OpenGrid.Framework.Communications</Name>
93 </ProjectReference>
94 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj"> 90 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj">
95 <Name>OpenSim.Terrain.BasicTerrain</Name> 91 <Name>OpenSim.Terrain.BasicTerrain</Name>
96 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project> 92 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project>
@@ -133,6 +129,12 @@
133 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 129 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
134 <Private>False</Private> 130 <Private>False</Private>
135 </ProjectReference> 131 </ProjectReference>
132 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
133 <Name>OpenGrid.Framework.Communications</Name>
134 <Project>{683344D5-0000-0000-0000-000000000000}</Project>
135 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
136 <Private>False</Private>
137 </ProjectReference>
136 </ItemGroup> 138 </ItemGroup>
137 <ItemGroup> 139 <ItemGroup>
138 <Compile Include="Avatar.Client.cs"> 140 <Compile Include="Avatar.Client.cs">
diff --git a/OpenSim/OpenSim.World/Primitive2.cs b/OpenSim/OpenSim.World/Primitive2.cs
deleted file mode 100644
index 6d071d4..0000000
--- a/OpenSim/OpenSim.World/Primitive2.cs
+++ /dev/null
@@ -1,491 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.types;
5using libsecondlife;
6using libsecondlife.Packets;
7using OpenSim.Framework.Interfaces;
8using OpenSim.Physics.Manager;
9using OpenSim.Framework.Types;
10using OpenSim.Framework.Inventory;
11
12namespace OpenSim.world
13{
14 public class Primitive2 : Entity
15 {
16 protected PrimData primData;
17 //private ObjectUpdatePacket OurPacket;
18 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
19 private Dictionary<uint, ClientView> m_clientThreads;
20 private ulong m_regionHandle;
21 private const uint FULL_MASK_PERMISSIONS = 2147483647;
22 private bool physicsEnabled = false;
23
24 private Dictionary<LLUUID, InventoryItem> inventoryItems;
25
26 #region Properties
27
28 public LLVector3 Scale
29 {
30 set
31 {
32 this.primData.Scale = value;
33 //this.dirtyFlag = true;
34 }
35 get
36 {
37 return this.primData.Scale;
38 }
39 }
40
41 public PhysicsActor PhysActor
42 {
43 set
44 {
45 this._physActor = value;
46 }
47 }
48 public override LLVector3 Pos
49 {
50 get
51 {
52 return base.Pos;
53 }
54 set
55 {
56 base.Pos = value;
57 }
58 }
59 #endregion
60
61 public Primitive2(Dictionary<uint, ClientView> clientThreads, ulong regionHandle, World world)
62 {
63 m_clientThreads = clientThreads;
64 m_regionHandle = regionHandle;
65 m_world = world;
66 inventoryItems = new Dictionary<LLUUID, InventoryItem>();
67 }
68
69 public Primitive2(Dictionary<uint, ClientView> clientThreads, ulong regionHandle, World world, LLUUID owner)
70 {
71 m_clientThreads = clientThreads;
72 m_regionHandle = regionHandle;
73 m_world = world;
74 inventoryItems = new Dictionary<LLUUID, InventoryItem>();
75 this.primData = new PrimData();
76 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
77 this.primData.OwnerID = owner;
78 }
79
80 public byte[] GetByteArray()
81 {
82 byte[] result = null;
83 List<byte[]> dataArrays = new List<byte[]>();
84 dataArrays.Add(primData.ToBytes());
85 foreach (Entity child in children)
86 {
87 if (child is OpenSim.world.Primitive2)
88 {
89 dataArrays.Add(((OpenSim.world.Primitive2)child).GetByteArray());
90 }
91 }
92 byte[] primstart = Helpers.StringToField("<Prim>");
93 byte[] primend = Helpers.StringToField("</Prim>");
94 int totalLength = primstart.Length + primend.Length;
95 for (int i = 0; i < dataArrays.Count; i++)
96 {
97 totalLength += dataArrays[i].Length;
98 }
99
100 result = new byte[totalLength];
101 int arraypos = 0;
102 Array.Copy(primstart, 0, result, 0, primstart.Length);
103 arraypos += primstart.Length;
104 for (int i = 0; i < dataArrays.Count; i++)
105 {
106 Array.Copy(dataArrays[i], 0, result, arraypos, dataArrays[i].Length);
107 arraypos += dataArrays[i].Length;
108 }
109 Array.Copy(primend, 0, result, arraypos, primend.Length);
110
111 return result;
112 }
113
114 #region Overridden Methods
115
116 public override void update()
117 {
118 LLVector3 pos2 = new LLVector3(0, 0, 0);
119 }
120
121 public override void BackUp()
122 {
123
124 }
125
126 #endregion
127
128 #region Packet handlers
129
130 public void UpdatePosition(LLVector3 pos)
131 {
132
133 }
134
135 public void UpdateShape(ObjectShapePacket.ObjectDataBlock addPacket)
136 {
137 this.primData.PathBegin = addPacket.PathBegin;
138 this.primData.PathEnd = addPacket.PathEnd;
139 this.primData.PathScaleX = addPacket.PathScaleX;
140 this.primData.PathScaleY = addPacket.PathScaleY;
141 this.primData.PathShearX = addPacket.PathShearX;
142 this.primData.PathShearY = addPacket.PathShearY;
143 this.primData.PathSkew = addPacket.PathSkew;
144 this.primData.ProfileBegin = addPacket.ProfileBegin;
145 this.primData.ProfileEnd = addPacket.ProfileEnd;
146 this.primData.PathCurve = addPacket.PathCurve;
147 this.primData.ProfileCurve = addPacket.ProfileCurve;
148 this.primData.ProfileHollow = addPacket.ProfileHollow;
149 this.primData.PathRadiusOffset = addPacket.PathRadiusOffset;
150 this.primData.PathRevolutions = addPacket.PathRevolutions;
151 this.primData.PathTaperX = addPacket.PathTaperX;
152 this.primData.PathTaperY = addPacket.PathTaperY;
153 this.primData.PathTwist = addPacket.PathTwist;
154 this.primData.PathTwistBegin = addPacket.PathTwistBegin;
155 }
156
157 public void UpdateTexture(byte[] tex)
158 {
159 this.primData.Texture = tex;
160 //this.dirtyFlag = true;
161 }
162
163 public void UpdateObjectFlags(ObjectFlagUpdatePacket pack)
164 {
165
166 }
167
168 public void AssignToParent(Primitive prim)
169 {
170
171 }
172
173 public void GetProperites(ClientView client)
174 {
175 ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
176 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
177 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
178 proper.ObjectData[0].ItemID = LLUUID.Zero;
179 proper.ObjectData[0].CreationDate = (ulong)this.primData.CreationDate;
180 proper.ObjectData[0].CreatorID = this.primData.OwnerID;
181 proper.ObjectData[0].FolderID = LLUUID.Zero;
182 proper.ObjectData[0].FromTaskID = LLUUID.Zero;
183 proper.ObjectData[0].GroupID = LLUUID.Zero;
184 proper.ObjectData[0].InventorySerial = 0;
185 proper.ObjectData[0].LastOwnerID = LLUUID.Zero;
186 proper.ObjectData[0].ObjectID = this.uuid;
187 proper.ObjectData[0].OwnerID = primData.OwnerID;
188 proper.ObjectData[0].TouchName = new byte[0];
189 proper.ObjectData[0].TextureID = new byte[0];
190 proper.ObjectData[0].SitName = new byte[0];
191 proper.ObjectData[0].Name = new byte[0];
192 proper.ObjectData[0].Description = new byte[0];
193 proper.ObjectData[0].OwnerMask = this.primData.OwnerMask;
194 proper.ObjectData[0].NextOwnerMask = this.primData.NextOwnerMask;
195 proper.ObjectData[0].GroupMask = this.primData.GroupMask;
196 proper.ObjectData[0].EveryoneMask = this.primData.EveryoneMask;
197 proper.ObjectData[0].BaseMask = this.primData.BaseMask;
198
199 client.OutPacket(proper);
200 }
201
202 #endregion
203
204 # region Inventory Methods
205
206 public bool AddToInventory(InventoryItem item)
207 {
208 return false;
209 }
210
211 public InventoryItem RemoveFromInventory(LLUUID itemID)
212 {
213 return null;
214 }
215
216 public void RequestInventoryInfo(ClientView simClient, RequestTaskInventoryPacket packet)
217 {
218
219 }
220
221 public void RequestXferInventory(ClientView simClient, ulong xferID)
222 {
223 //will only currently work if the total size of the inventory data array is under about 1000 bytes
224 SendXferPacketPacket send = new SendXferPacketPacket();
225
226 send.XferID.ID = xferID;
227 send.XferID.Packet = 1 + 2147483648;
228 send.DataPacket.Data = this.ConvertInventoryToBytes();
229
230 simClient.OutPacket(send);
231 }
232
233 public byte[] ConvertInventoryToBytes()
234 {
235 System.Text.Encoding enc = System.Text.Encoding.ASCII;
236 byte[] result = new byte[0];
237 List<byte[]> inventoryData = new List<byte[]>();
238 int totallength = 0;
239 foreach (InventoryItem invItem in inventoryItems.Values)
240 {
241 byte[] data = enc.GetBytes(invItem.ExportString());
242 inventoryData.Add(data);
243 totallength += data.Length;
244 }
245 //TODO: copy arrays into the single result array
246
247 return result;
248 }
249
250 public void CreateInventoryFromBytes(byte[] data)
251 {
252
253 }
254
255 #endregion
256
257 #region Update viewers Methods
258
259 //should change these mehtods, so that outgoing packets are sent through the avatar class
260 public void SendFullUpdateToClient(ClientView remoteClient)
261 {
262 LLVector3 lPos;
263 if (this._physActor != null && this.physicsEnabled)
264 {
265 PhysicsVector pPos = this._physActor.Position;
266 lPos = new LLVector3(pPos.X, pPos.Y, pPos.Z);
267 }
268 else
269 {
270 lPos = this.Pos;
271 }
272
273 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
274 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
275 outPacket.ObjectData[0] = this.CreateUpdateBlock();
276 byte[] pb = lPos.GetBytes();
277 Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
278
279 remoteClient.OutPacket(outPacket);
280 }
281
282 public void SendFullUpdateToAllClients()
283 {
284
285 }
286
287 public void SendTerseUpdateToClient(ClientView RemoteClient)
288 {
289
290 }
291
292 public void SendTerseUpdateToALLClients()
293 {
294
295 }
296
297 #endregion
298
299 #region Create Methods
300
301 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID ownerID, uint localID)
302 {
303 PrimData PData = new PrimData();
304 this.primData = PData;
305 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
306
307 PData.OwnerID = ownerID;
308 PData.PCode = addPacket.ObjectData.PCode;
309 PData.PathBegin = addPacket.ObjectData.PathBegin;
310 PData.PathEnd = addPacket.ObjectData.PathEnd;
311 PData.PathScaleX = addPacket.ObjectData.PathScaleX;
312 PData.PathScaleY = addPacket.ObjectData.PathScaleY;
313 PData.PathShearX = addPacket.ObjectData.PathShearX;
314 PData.PathShearY = addPacket.ObjectData.PathShearY;
315 PData.PathSkew = addPacket.ObjectData.PathSkew;
316 PData.ProfileBegin = addPacket.ObjectData.ProfileBegin;
317 PData.ProfileEnd = addPacket.ObjectData.ProfileEnd;
318 PData.Scale = addPacket.ObjectData.Scale;
319 PData.PathCurve = addPacket.ObjectData.PathCurve;
320 PData.ProfileCurve = addPacket.ObjectData.ProfileCurve;
321 PData.ParentID = 0;
322 PData.ProfileHollow = addPacket.ObjectData.ProfileHollow;
323 PData.PathRadiusOffset = addPacket.ObjectData.PathRadiusOffset;
324 PData.PathRevolutions = addPacket.ObjectData.PathRevolutions;
325 PData.PathTaperX = addPacket.ObjectData.PathTaperX;
326 PData.PathTaperY = addPacket.ObjectData.PathTaperY;
327 PData.PathTwist = addPacket.ObjectData.PathTwist;
328 PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
329 LLVector3 pos1 = addPacket.ObjectData.RayEnd;
330 this.primData.FullID = this.uuid = LLUUID.Random();
331 this.localid = (uint)(localID);
332 this.primData.Position = this.Pos = pos1;
333 }
334
335 public void CreateFromBytes(byte[] data)
336 {
337
338 }
339
340 public void CreateFromPrimData(PrimData primData)
341 {
342 this.CreateFromPrimData(primData, primData.Position, primData.LocalID, false);
343 }
344
345 public void CreateFromPrimData(PrimData primData, LLVector3 posi, uint localID, bool newprim)
346 {
347
348 }
349
350 #endregion
351
352 #region Packet Update Methods
353 protected void SetDefaultPacketValues(ObjectUpdatePacket.ObjectDataBlock objdata)
354 {
355 objdata.PSBlock = new byte[0];
356 objdata.ExtraParams = new byte[1];
357 objdata.MediaURL = new byte[0];
358 objdata.NameValue = new byte[0];
359 objdata.Text = new byte[0];
360 objdata.TextColor = new byte[4];
361 objdata.JointAxisOrAnchor = new LLVector3(0, 0, 0);
362 objdata.JointPivot = new LLVector3(0, 0, 0);
363 objdata.Material = 3;
364 objdata.TextureAnim = new byte[0];
365 objdata.Sound = LLUUID.Zero;
366 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
367 this.primData.Texture = objdata.TextureEntry = ntex.ToBytes();
368 objdata.State = 0;
369 objdata.Data = new byte[0];
370
371 objdata.ObjectData = new byte[60];
372 objdata.ObjectData[46] = 128;
373 objdata.ObjectData[47] = 63;
374 }
375
376 protected void SetPacketShapeData(ObjectUpdatePacket.ObjectDataBlock objectData)
377 {
378 objectData.OwnerID = this.primData.OwnerID;
379 objectData.PCode = this.primData.PCode;
380 objectData.PathBegin = this.primData.PathBegin;
381 objectData.PathEnd = this.primData.PathEnd;
382 objectData.PathScaleX = this.primData.PathScaleX;
383 objectData.PathScaleY = this.primData.PathScaleY;
384 objectData.PathShearX = this.primData.PathShearX;
385 objectData.PathShearY = this.primData.PathShearY;
386 objectData.PathSkew = this.primData.PathSkew;
387 objectData.ProfileBegin = this.primData.ProfileBegin;
388 objectData.ProfileEnd = this.primData.ProfileEnd;
389 objectData.Scale = this.primData.Scale;
390 objectData.PathCurve = this.primData.PathCurve;
391 objectData.ProfileCurve = this.primData.ProfileCurve;
392 objectData.ParentID = this.primData.ParentID;
393 objectData.ProfileHollow = this.primData.ProfileHollow;
394 objectData.PathRadiusOffset = this.primData.PathRadiusOffset;
395 objectData.PathRevolutions = this.primData.PathRevolutions;
396 objectData.PathTaperX = this.primData.PathTaperX;
397 objectData.PathTaperY = this.primData.PathTaperY;
398 objectData.PathTwist = this.primData.PathTwist;
399 objectData.PathTwistBegin = this.primData.PathTwistBegin;
400 }
401
402 #endregion
403 protected ObjectUpdatePacket.ObjectDataBlock CreateUpdateBlock()
404 {
405 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock();
406 this.SetDefaultPacketValues(objupdate);
407 objupdate.UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456;
408 this.SetPacketShapeData(objupdate);
409 byte[] pb = this.Pos.GetBytes();
410 Array.Copy(pb, 0, objupdate.ObjectData, 0, pb.Length);
411 return objupdate;
412 }
413
414 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedBlock()
415 {
416 uint ID = this.localid;
417 byte[] bytes = new byte[60];
418
419 int i = 0;
420 ImprovedTerseObjectUpdatePacket.ObjectDataBlock dat = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
421 dat.TextureEntry = new byte[0];
422 bytes[i++] = (byte)(ID % 256);
423 bytes[i++] = (byte)((ID >> 8) % 256);
424 bytes[i++] = (byte)((ID >> 16) % 256);
425 bytes[i++] = (byte)((ID >> 24) % 256);
426 bytes[i++] = 0;
427 bytes[i++] = 0;
428
429 LLVector3 lPos;
430 Axiom.MathLib.Quaternion lRot;
431 if (this._physActor != null && this.physicsEnabled)
432 {
433 PhysicsVector pPos = this._physActor.Position;
434 lPos = new LLVector3(pPos.X, pPos.Y, pPos.Z);
435 lRot = this._physActor.Orientation;
436 }
437 else
438 {
439 lPos = this.Pos;
440 lRot = this.rotation;
441 }
442 byte[] pb = lPos.GetBytes();
443 Array.Copy(pb, 0, bytes, i, pb.Length);
444 i += 12;
445 ushort ac = 32767;
446
447 //vel
448 bytes[i++] = (byte)(ac % 256);
449 bytes[i++] = (byte)((ac >> 8) % 256);
450 bytes[i++] = (byte)(ac % 256);
451 bytes[i++] = (byte)((ac >> 8) % 256);
452 bytes[i++] = (byte)(ac % 256);
453 bytes[i++] = (byte)((ac >> 8) % 256);
454
455 //accel
456 bytes[i++] = (byte)(ac % 256);
457 bytes[i++] = (byte)((ac >> 8) % 256);
458 bytes[i++] = (byte)(ac % 256);
459 bytes[i++] = (byte)((ac >> 8) % 256);
460 bytes[i++] = (byte)(ac % 256);
461 bytes[i++] = (byte)((ac >> 8) % 256);
462
463 ushort rw, rx, ry, rz;
464 rw = (ushort)(32768 * (lRot.w + 1));
465 rx = (ushort)(32768 * (lRot.x + 1));
466 ry = (ushort)(32768 * (lRot.y + 1));
467 rz = (ushort)(32768 * (lRot.z + 1));
468
469 //rot
470 bytes[i++] = (byte)(rx % 256);
471 bytes[i++] = (byte)((rx >> 8) % 256);
472 bytes[i++] = (byte)(ry % 256);
473 bytes[i++] = (byte)((ry >> 8) % 256);
474 bytes[i++] = (byte)(rz % 256);
475 bytes[i++] = (byte)((rz >> 8) % 256);
476 bytes[i++] = (byte)(rw % 256);
477 bytes[i++] = (byte)((rw >> 8) % 256);
478
479 //rotation vel
480 bytes[i++] = (byte)(ac % 256);
481 bytes[i++] = (byte)((ac >> 8) % 256);
482 bytes[i++] = (byte)(ac % 256);
483 bytes[i++] = (byte)((ac >> 8) % 256);
484 bytes[i++] = (byte)(ac % 256);
485 bytes[i++] = (byte)((ac >> 8) % 256);
486
487 dat.Data = bytes;
488 return dat;
489 }
490 }
491}
diff --git a/OpenSim/OpenSim/OpenSim.csproj b/OpenSim/OpenSim/OpenSim.csproj
index 03ae6ab..0033d6b 100644
--- a/OpenSim/OpenSim/OpenSim.csproj
+++ b/OpenSim/OpenSim/OpenSim.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,8 +6,7 @@
6 <ProjectGuid>{438A9556-0000-0000-0000-000000000000}</ProjectGuid> 6 <ProjectGuid>{438A9556-0000-0000-0000-000000000000}</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> 9 <ApplicationIcon></ApplicationIcon>
10 </ApplicationIcon>
11 <AssemblyKeyContainerName> 10 <AssemblyKeyContainerName>
12 </AssemblyKeyContainerName> 11 </AssemblyKeyContainerName>
13 <AssemblyName>OpenSim</AssemblyName> 12 <AssemblyName>OpenSim</AssemblyName>
@@ -16,11 +15,9 @@
16 <DefaultTargetSchema>IE50</DefaultTargetSchema> 15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
17 <DelaySign>false</DelaySign> 16 <DelaySign>false</DelaySign>
18 <OutputType>Exe</OutputType> 17 <OutputType>Exe</OutputType>
19 <AppDesignerFolder> 18 <AppDesignerFolder></AppDesignerFolder>
20 </AppDesignerFolder>
21 <RootNamespace>OpenSim</RootNamespace> 19 <RootNamespace>OpenSim</RootNamespace>
22 <StartupObject> 20 <StartupObject></StartupObject>
23 </StartupObject>
24 <FileUpgradeFlags> 21 <FileUpgradeFlags>
25 </FileUpgradeFlags> 22 </FileUpgradeFlags>
26 </PropertyGroup> 23 </PropertyGroup>
@@ -31,8 +28,7 @@
31 <ConfigurationOverrideFile> 28 <ConfigurationOverrideFile>
32 </ConfigurationOverrideFile> 29 </ConfigurationOverrideFile>
33 <DefineConstants>TRACE;DEBUG</DefineConstants> 30 <DefineConstants>TRACE;DEBUG</DefineConstants>
34 <DocumentationFile> 31 <DocumentationFile></DocumentationFile>
35 </DocumentationFile>
36 <DebugSymbols>True</DebugSymbols> 32 <DebugSymbols>True</DebugSymbols>
37 <FileAlignment>4096</FileAlignment> 33 <FileAlignment>4096</FileAlignment>
38 <Optimize>False</Optimize> 34 <Optimize>False</Optimize>
@@ -41,8 +37,7 @@
41 <RemoveIntegerChecks>False</RemoveIntegerChecks> 37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
42 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
43 <WarningLevel>4</WarningLevel> 39 <WarningLevel>4</WarningLevel>
44 <NoWarn> 40 <NoWarn></NoWarn>
45 </NoWarn>
46 </PropertyGroup> 41 </PropertyGroup>
47 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
48 <AllowUnsafeBlocks>False</AllowUnsafeBlocks> 43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@@ -51,8 +46,7 @@
51 <ConfigurationOverrideFile> 46 <ConfigurationOverrideFile>
52 </ConfigurationOverrideFile> 47 </ConfigurationOverrideFile>
53 <DefineConstants>TRACE</DefineConstants> 48 <DefineConstants>TRACE</DefineConstants>
54 <DocumentationFile> 49 <DocumentationFile></DocumentationFile>
55 </DocumentationFile>
56 <DebugSymbols>False</DebugSymbols> 50 <DebugSymbols>False</DebugSymbols>
57 <FileAlignment>4096</FileAlignment> 51 <FileAlignment>4096</FileAlignment>
58 <Optimize>True</Optimize> 52 <Optimize>True</Optimize>
@@ -61,87 +55,90 @@
61 <RemoveIntegerChecks>False</RemoveIntegerChecks> 55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
62 <TreatWarningsAsErrors>False</TreatWarningsAsErrors> 56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
63 <WarningLevel>4</WarningLevel> 57 <WarningLevel>4</WarningLevel>
64 <NoWarn> 58 <NoWarn></NoWarn>
65 </NoWarn>
66 </PropertyGroup> 59 </PropertyGroup>
67 <ItemGroup> 60 <ItemGroup>
68 <Reference Include="System"> 61 <Reference Include="System" >
69 <HintPath>System.dll</HintPath> 62 <HintPath>System.dll</HintPath>
70 <Private>False</Private> 63 <Private>False</Private>
71 </Reference> 64 </Reference>
72 <Reference Include="System.Xml"> 65 <Reference Include="System.Xml" >
73 <HintPath>System.Xml.dll</HintPath> 66 <HintPath>System.Xml.dll</HintPath>
74 <Private>False</Private> 67 <Private>False</Private>
75 </Reference> 68 </Reference>
76 <Reference Include="libsecondlife.dll"> 69 <Reference Include="libsecondlife.dll" >
77 <HintPath>..\..\bin\libsecondlife.dll</HintPath> 70 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
78 <Private>False</Private> 71 <Private>False</Private>
79 </Reference> 72 </Reference>
80 <Reference Include="Axiom.MathLib.dll"> 73 <Reference Include="Axiom.MathLib.dll" >
81 <HintPath>..\..\bin\Axiom.MathLib.dll</HintPath> 74 <HintPath>..\..\bin\Axiom.MathLib.dll</HintPath>
82 <Private>False</Private> 75 <Private>False</Private>
83 </Reference> 76 </Reference>
84 <Reference Include="Db4objects.Db4o.dll"> 77 <Reference Include="Db4objects.Db4o.dll" >
85 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> 78 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
86 <Private>False</Private> 79 <Private>False</Private>
87 </Reference> 80 </Reference>
88 </ItemGroup> 81 </ItemGroup>
89 <ItemGroup> 82 <ItemGroup>
90 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
91 <Project>{C9702041-922C-452A-A1B4-7880AF53149A}</Project>
92 <Name>OpenGrid.Framework.Communications</Name>
93 </ProjectReference>
94 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj"> 83 <ProjectReference Include="..\OpenSim.Terrain.BasicTerrain\OpenSim.Terrain.BasicTerrain.csproj">
95 <Name>OpenSim.Terrain.BasicTerrain</Name> 84 <Name>OpenSim.Terrain.BasicTerrain</Name>
96 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project> 85 <Project>{2270B8FE-0000-0000-0000-000000000000}</Project>
97 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
98 <Private>False</Private> 87 <Private>False</Private>
99 </ProjectReference> 88 </ProjectReference>
100 <ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> 89 <ProjectReference Include="..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj">
101 <Name>OpenSim.Framework</Name> 90 <Name>OpenSim.Framework</Name>
102 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> 91 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
103 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
104 <Private>False</Private> 93 <Private>False</Private>
105 </ProjectReference> 94 </ProjectReference>
106 <ProjectReference Include="..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> 95 <ProjectReference Include="..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
107 <Name>OpenSim.Framework.Console</Name> 96 <Name>OpenSim.Framework.Console</Name>
108 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> 97 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
109 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
110 <Private>False</Private> 99 <Private>False</Private>
111 </ProjectReference> 100 </ProjectReference>
112 <ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj"> 101 <ProjectReference Include="..\OpenSim.Physics\Manager\OpenSim.Physics.Manager.csproj">
113 <Name>OpenSim.Physics.Manager</Name> 102 <Name>OpenSim.Physics.Manager</Name>
114 <Project>{8BE16150-0000-0000-0000-000000000000}</Project> 103 <Project>{8BE16150-0000-0000-0000-000000000000}</Project>
115 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
116 <Private>False</Private> 105 <Private>False</Private>
117 </ProjectReference> 106 </ProjectReference>
118 <ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj"> 107 <ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj">
119 <Name>OpenSim.Servers</Name> 108 <Name>OpenSim.Servers</Name>
120 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> 109 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
121 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
122 <Private>False</Private> 111 <Private>False</Private>
112 </ProjectReference>
113 <ProjectReference Include="..\OpenSim.World\OpenSim.World.csproj">
114 <Name>OpenSim.World</Name>
115 <Project>{642A14A8-0000-0000-0000-000000000000}</Project>
116 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
117 <Private>False</Private>
123 </ProjectReference> 118 </ProjectReference>
124 <ProjectReference Include="..\OpenSim.RegionServer\OpenSim.RegionServer.csproj"> 119 <ProjectReference Include="..\OpenSim.RegionServer\OpenSim.RegionServer.csproj">
125 <Name>OpenSim.RegionServer</Name> 120 <Name>OpenSim.RegionServer</Name>
126 <Project>{632E1BFD-0000-0000-0000-000000000000}</Project> 121 <Project>{632E1BFD-0000-0000-0000-000000000000}</Project>
127 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 122 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
128 <Private>False</Private> 123 <Private>False</Private>
129 </ProjectReference> 124 </ProjectReference>
130 <ProjectReference Include="..\..\Common\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj"> 125 <ProjectReference Include="..\..\Common\OpenSim.GenericConfig\Xml\OpenSim.GenericConfig.Xml.csproj">
131 <Name>OpenSim.GenericConfig.Xml</Name> 126 <Name>OpenSim.GenericConfig.Xml</Name>
132 <Project>{E88EF749-0000-0000-0000-000000000000}</Project> 127 <Project>{E88EF749-0000-0000-0000-000000000000}</Project>
133 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 128 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
134 <Private>False</Private> 129 <Private>False</Private>
130 </ProjectReference>
131 <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
132 <Name>OpenGrid.Framework.Communications</Name>
133 <Project>{683344D5-0000-0000-0000-000000000000}</Project>
134 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
135 <Private>False</Private>
135 </ProjectReference> 136 </ProjectReference>
136 <ProjectReference Include="..\..\Common\XmlRpcCS\XMLRPC.csproj"> 137 <ProjectReference Include="..\..\Common\XmlRpcCS\XMLRPC.csproj">
137 <Name>XMLRPC</Name> 138 <Name>XMLRPC</Name>
138 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> 139 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
139 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 140 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
140 <Private>False</Private> 141 <Private>False</Private>
141 </ProjectReference>
142 <ProjectReference Include="..\OpenSim.World\OpenSim.World.csproj">
143 <Project>{642A14A8-0000-0000-0000-000000000000}</Project>
144 <Name>OpenSim.World</Name>
145 </ProjectReference> 142 </ProjectReference>
146 </ItemGroup> 143 </ItemGroup>
147 <ItemGroup> 144 <ItemGroup>
@@ -159,4 +156,4 @@
159 <PostBuildEvent> 156 <PostBuildEvent>
160 </PostBuildEvent> 157 </PostBuildEvent>
161 </PropertyGroup> 158 </PropertyGroup>
162</Project> \ No newline at end of file 159</Project>