aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.Region/ParcelManager.cs4
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs2
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Avatar.cs8
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Entity.cs10
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Primitive.cs8
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs2
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs8
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.cs2
-rw-r--r--OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj6
9 files changed, 30 insertions, 20 deletions
diff --git a/OpenSim/OpenSim.Region/ParcelManager.cs b/OpenSim/OpenSim.Region/ParcelManager.cs
index ce53d24..3b0785f 100644
--- a/OpenSim/OpenSim.Region/ParcelManager.cs
+++ b/OpenSim/OpenSim.Region/ParcelManager.cs
@@ -237,7 +237,7 @@ namespace OpenSim.Region
237 } 237 }
238 } 238 }
239 } 239 }
240 catch (Exception e) 240 catch (Exception)
241 { 241 {
242 return false; //Exception. For now, lets skip subdivision 242 return false; //Exception. For now, lets skip subdivision
243 } 243 }
@@ -294,7 +294,7 @@ namespace OpenSim.Region
294 startParcel = getParcel(start_x, start_y); 294 startParcel = getParcel(start_x, start_y);
295 endParcel = getParcel(end_x, end_y); 295 endParcel = getParcel(end_x, end_y);
296 } 296 }
297 catch (Exception e) 297 catch (Exception)
298 { 298 {
299 return false; //Error occured when trying to get the start and end parcels 299 return false; //Error occured when trying to get the start and end parcels
300 } 300 }
diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs
index 534bda4..8b27efe 100644
--- a/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Scenes
87 /// </summary> 87 /// </summary>
88 public void SendInitialPosition() 88 public void SendInitialPosition()
89 { 89 {
90 this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.localid, this.Pos); 90 this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos);
91 } 91 }
92 92
93 /// <summary> 93 /// <summary>
diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.cs
index 6b393a8..3e371f0 100644
--- a/OpenSim/OpenSim.Region/Scenes/Avatar.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Avatar.cs
@@ -59,7 +59,6 @@ namespace OpenSim.Region.Scenes
59 private AvatarWearable[] Wearables; 59 private AvatarWearable[] Wearables;
60 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0); 60 private LLVector3 positionLastFrame = new LLVector3(0, 0, 0);
61 private ulong m_regionHandle; 61 private ulong m_regionHandle;
62 private Dictionary<uint, IClientAPI> m_clientThreads;
63 private bool childAvatar = false; 62 private bool childAvatar = false;
64 private bool newForce = false; 63 private bool newForce = false;
65 64
@@ -71,11 +70,10 @@ namespace OpenSim.Region.Scenes
71 /// <param name="world"></param> 70 /// <param name="world"></param>
72 /// <param name="clientThreads"></param> 71 /// <param name="clientThreads"></param>
73 /// <param name="regionDat"></param> 72 /// <param name="regionDat"></param>
74 public Avatar(IClientAPI theClient, Scene world, Dictionary<uint, IClientAPI> clientThreads, RegionInfo reginfo) 73 public Avatar(IClientAPI theClient, Scene world, RegionInfo reginfo)
75 { 74 {
76 75
77 m_world = world; 76 m_world = world;
78 m_clientThreads = clientThreads;
79 this.uuid = theClient.AgentId; 77 this.uuid = theClient.AgentId;
80 78
81 m_regionInfo = reginfo; 79 m_regionInfo = reginfo;
@@ -84,7 +82,7 @@ namespace OpenSim.Region.Scenes
84 ControllingClient = theClient; 82 ControllingClient = theClient;
85 this.firstname = ControllingClient.FirstName; 83 this.firstname = ControllingClient.FirstName;
86 this.lastname = ControllingClient.LastName; 84 this.lastname = ControllingClient.LastName;
87 localid = this.m_world.NextLocalId; 85 m_localId = m_world.NextLocalId;
88 Pos = ControllingClient.StartPos; 86 Pos = ControllingClient.StartPos;
89 visualParams = new byte[218]; 87 visualParams = new byte[218];
90 for (int i = 0; i < 218; i++) 88 for (int i = 0; i < 218; i++)
@@ -196,7 +194,7 @@ namespace OpenSim.Region.Scenes
196 { 194 {
197 LLVector3 pos = this.Pos; 195 LLVector3 pos = this.Pos;
198 LLVector3 vel = this.Velocity; 196 LLVector3 vel = this.Velocity;
199 RemoteClient.SendAvatarTerseUpdate(this.m_regionHandle, 64096, this.localid, new LLVector3(pos.X, pos.Y, pos.Z), new LLVector3(vel.X, vel.Y, vel.Z)); 197 RemoteClient.SendAvatarTerseUpdate(this.m_regionHandle, 64096, this.LocalId, new LLVector3(pos.X, pos.Y, pos.Z), new LLVector3(vel.X, vel.Y, vel.Z));
200 } 198 }
201 199
202 /// <summary> 200 /// <summary>
diff --git a/OpenSim/OpenSim.Region/Scenes/Entity.cs b/OpenSim/OpenSim.Region/Scenes/Entity.cs
index 007bdaf..2376fc4 100644
--- a/OpenSim/OpenSim.Region/Scenes/Entity.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Entity.cs
@@ -38,7 +38,6 @@ namespace OpenSim.Region.Scenes
38 public abstract class Entity : IScriptReadonlyEntity 38 public abstract class Entity : IScriptReadonlyEntity
39 { 39 {
40 public libsecondlife.LLUUID uuid; 40 public libsecondlife.LLUUID uuid;
41 public uint localid;
42 public LLVector3 velocity; 41 public LLVector3 velocity;
43 public Quaternion rotation; 42 public Quaternion rotation;
44 protected List<Entity> children; 43 protected List<Entity> children;
@@ -128,13 +127,20 @@ namespace OpenSim.Region.Scenes
128 } 127 }
129 } 128 }
130 129
130 protected uint m_localId;
131
132 public uint LocalId
133 {
134 get { return m_localId; }
135 }
136
131 /// <summary> 137 /// <summary>
132 /// Creates a new Entity (should not occur on it's own) 138 /// Creates a new Entity (should not occur on it's own)
133 /// </summary> 139 /// </summary>
134 public Entity() 140 public Entity()
135 { 141 {
136 uuid = new libsecondlife.LLUUID(); 142 uuid = new libsecondlife.LLUUID();
137 localid = 0; 143
138 m_pos = new LLVector3(); 144 m_pos = new LLVector3();
139 velocity = new LLVector3(); 145 velocity = new LLVector3();
140 rotation = new Quaternion(); 146 rotation = new Quaternion();
diff --git a/OpenSim/OpenSim.Region/Scenes/Primitive.cs b/OpenSim/OpenSim.Region/Scenes/Primitive.cs
index 9bccfd3..929f0b5 100644
--- a/OpenSim/OpenSim.Region/Scenes/Primitive.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Primitive.cs
@@ -136,7 +136,7 @@ namespace OpenSim.Region.Scenes
136 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 136 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
137 this.primData.OwnerID = owner; 137 this.primData.OwnerID = owner;
138 this.primData.FullID = this.uuid = fullID; 138 this.primData.FullID = this.uuid = fullID;
139 this.primData.LocalID = this.localid = localID; 139 this.primData.LocalID = m_localId = localID;
140 } 140 }
141 141
142 /// <summary> 142 /// <summary>
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Scenes
156 inventoryItems = new Dictionary<LLUUID, InventoryItem>(); 156 inventoryItems = new Dictionary<LLUUID, InventoryItem>();
157 this.primData = PrimData.DefaultCube(); 157 this.primData = PrimData.DefaultCube();
158 this.primData.OwnerID = owner; 158 this.primData.OwnerID = owner;
159 this.primData.LocalID = this.localid = localID; 159 this.primData.LocalID = m_localId = localID;
160 this.Pos = this.primData.Position = position; 160 this.Pos = this.primData.Position = position;
161 161
162 this.updateFlag = 1; 162 this.updateFlag = 1;
@@ -411,7 +411,7 @@ namespace OpenSim.Region.Scenes
411 lPos = this.Pos; 411 lPos = this.Pos;
412 } 412 }
413 413
414 remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.localid, this.primData, lPos, new LLUUID("00000000-0000-0000-5005-000000000005")); 414 remoteClient.SendPrimitiveToClient(this.m_regionHandle, 64096, this.LocalId, this.primData, lPos, new LLUUID("00000000-0000-0000-5005-000000000005"));
415 } 415 }
416 416
417 /// <summary> 417 /// <summary>
@@ -499,7 +499,7 @@ namespace OpenSim.Region.Scenes
499 PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin; 499 PData.PathTwistBegin = addPacket.ObjectData.PathTwistBegin;
500 LLVector3 pos1 = addPacket.ObjectData.RayEnd; 500 LLVector3 pos1 = addPacket.ObjectData.RayEnd;
501 this.primData.FullID = this.uuid = LLUUID.Random(); 501 this.primData.FullID = this.uuid = LLUUID.Random();
502 this.primData.LocalID = this.localid = (uint)(localID); 502 this.primData.LocalID = m_localId = (uint)(localID);
503 this.primData.Position = this.Pos = pos1; 503 this.primData.Position = this.Pos = pos1;
504 504
505 this.updateFlag = 1; 505 this.updateFlag = 1;
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs b/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs
index 3d41200..35a3bda 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.PacketHandlers.cs
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Scenes
212 { 212 {
213 foreach (Entity ent in Entities.Values) 213 foreach (Entity ent in Entities.Values)
214 { 214 {
215 if (ent.localid == localID) 215 if (ent.LocalId == localID)
216 { 216 {
217 ((OpenSim.Region.Scenes.Primitive)ent).UpdatePosition(pos); 217 ((OpenSim.Region.Scenes.Primitive)ent).UpdatePosition(pos);
218 break; 218 break;
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs b/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs
index 50df16e..6317e43 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.Scripting.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Scenes
107 { 107 {
108 if(this.scriptEngines.ContainsKey(scriptType)) 108 if(this.scriptEngines.ContainsKey(scriptType))
109 { 109 {
110 this.scriptEngines[scriptType].LoadScript(script, scriptName, ent.localid); 110 this.scriptEngines[scriptType].LoadScript(script, scriptName, ent.LocalId);
111 } 111 }
112 } 112 }
113 113
@@ -124,7 +124,7 @@ namespace OpenSim.Region.Scenes
124 // Console.WriteLine("script- getting entity " + localID + " position"); 124 // Console.WriteLine("script- getting entity " + localID + " position");
125 foreach (Entity entity in this.Entities.Values) 125 foreach (Entity entity in this.Entities.Values)
126 { 126 {
127 if (entity.localid == localID) 127 if (entity.LocalId == localID)
128 { 128 {
129 res.X = entity.Pos.X; 129 res.X = entity.Pos.X;
130 res.Y = entity.Pos.Y; 130 res.Y = entity.Pos.Y;
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Scenes
145 { 145 {
146 foreach (Entity entity in this.Entities.Values) 146 foreach (Entity entity in this.Entities.Values)
147 { 147 {
148 if (entity.localid == localID && entity is Primitive) 148 if (entity.LocalId == localID && entity is Primitive)
149 { 149 {
150 LLVector3 pos = entity.Pos; 150 LLVector3 pos = entity.Pos;
151 pos.X = x; 151 pos.X = x;
@@ -171,7 +171,7 @@ namespace OpenSim.Region.Scenes
171 { 171 {
172 if (entity is Avatar) 172 if (entity is Avatar)
173 { 173 {
174 res = entity.localid; 174 res = entity.LocalId;
175 } 175 }
176 } 176 }
177 return res; 177 return res;
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs
index cb3865f..724d215 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs
@@ -564,7 +564,7 @@ namespace OpenSim.Region.Scenes
564 try 564 try
565 { 565 {
566 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 566 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
567 newAvatar = new Avatar(remoteClient, this, m_clientThreads, this.m_regInfo); 567 newAvatar = new Avatar(remoteClient, this, this.m_regInfo);
568 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); 568 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world");
569 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); 569 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake ");
570 570
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
index 63eeb9c..e569187 100644
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
+++ b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
@@ -110,6 +110,12 @@
110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> 110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
111 <Private>False</Private> 111 <Private>False</Private>
112 </ProjectReference> 112 </ProjectReference>
113 <ProjectReference Include="..\OpenSim.Region\OpenSim.Region.csproj">
114 <Name>OpenSim.Region</Name>
115 <Project>{196916AF-0000-0000-0000-000000000000}</Project>
116 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
117 <Private>False</Private>
118 </ProjectReference>
113 <ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj"> 119 <ProjectReference Include="..\..\Common\OpenSim.Servers\OpenSim.Servers.csproj">
114 <Name>OpenSim.Servers</Name> 120 <Name>OpenSim.Servers</Name>
115 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> 121 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>