aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/world
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.RegionServer/world/Primitive.cs4
-rw-r--r--OpenSim.RegionServer/world/Primitive2.cs4
-rw-r--r--OpenSim.RegionServer/world/World.cs47
3 files changed, 30 insertions, 25 deletions
diff --git a/OpenSim.RegionServer/world/Primitive.cs b/OpenSim.RegionServer/world/Primitive.cs
index 6124248..4f861f7 100644
--- a/OpenSim.RegionServer/world/Primitive.cs
+++ b/OpenSim.RegionServer/world/Primitive.cs
@@ -328,7 +328,7 @@ namespace OpenSim.world
328 this.dirtyFlag = true; 328 this.dirtyFlag = true;
329 } 329 }
330 330
331 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID) 331 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID ownerID, uint localID)
332 { 332 {
333 ObjectUpdatePacket objupdate = new ObjectUpdatePacket(); 333 ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
334 objupdate.RegionData.RegionHandle = m_regionHandle; 334 objupdate.RegionData.RegionHandle = m_regionHandle;
@@ -356,7 +356,7 @@ namespace OpenSim.world
356 this.primData.Texture = objupdate.ObjectData[0].TextureEntry = ntex.ToBytes(); 356 this.primData.Texture = objupdate.ObjectData[0].TextureEntry = ntex.ToBytes();
357 objupdate.ObjectData[0].State = 0; 357 objupdate.ObjectData[0].State = 0;
358 objupdate.ObjectData[0].Data = new byte[0]; 358 objupdate.ObjectData[0].Data = new byte[0];
359 PData.OwnerID = objupdate.ObjectData[0].OwnerID = agentID; 359 PData.OwnerID = objupdate.ObjectData[0].OwnerID = ownerID;
360 PData.PCode = objupdate.ObjectData[0].PCode = addPacket.ObjectData.PCode; 360 PData.PCode = objupdate.ObjectData[0].PCode = addPacket.ObjectData.PCode;
361 PData.PathBegin = objupdate.ObjectData[0].PathBegin = addPacket.ObjectData.PathBegin; 361 PData.PathBegin = objupdate.ObjectData[0].PathBegin = addPacket.ObjectData.PathBegin;
362 PData.PathEnd = objupdate.ObjectData[0].PathEnd = addPacket.ObjectData.PathEnd; 362 PData.PathEnd = objupdate.ObjectData[0].PathEnd = addPacket.ObjectData.PathEnd;
diff --git a/OpenSim.RegionServer/world/Primitive2.cs b/OpenSim.RegionServer/world/Primitive2.cs
index 5e76fd1..3b39456 100644
--- a/OpenSim.RegionServer/world/Primitive2.cs
+++ b/OpenSim.RegionServer/world/Primitive2.cs
@@ -287,13 +287,13 @@ namespace OpenSim.world
287 287
288 #region Create Methods 288 #region Create Methods
289 289
290 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID) 290 public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID ownerID, uint localID)
291 { 291 {
292 PrimData PData = new PrimData(); 292 PrimData PData = new PrimData();
293 this.primData = PData; 293 this.primData = PData;
294 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 294 this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
295 295
296 PData.OwnerID = agentID; 296 PData.OwnerID = ownerID;
297 PData.PCode = addPacket.ObjectData.PCode; 297 PData.PCode = addPacket.ObjectData.PCode;
298 PData.PathBegin = addPacket.ObjectData.PathBegin; 298 PData.PathBegin = addPacket.ObjectData.PathBegin;
299 PData.PathEnd = addPacket.ObjectData.PathEnd; 299 PData.PathEnd = addPacket.ObjectData.PathEnd;
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs
index ecf9c69..983e66d 100644
--- a/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim.RegionServer/world/World.cs
@@ -70,12 +70,12 @@ namespace OpenSim.world
70 m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); 70 m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>();
71 m_scripts = new Dictionary<string, ScriptFactory>(); 71 m_scripts = new Dictionary<string, ScriptFactory>();
72 72
73 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs - creating new entitities instance"); 73 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs - creating new entitities instance");
74 Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); 74 Entities = new Dictionary<libsecondlife.LLUUID, Entity>();
75 Avatars = new Dictionary<LLUUID, Avatar>(); 75 Avatars = new Dictionary<LLUUID, Avatar>();
76 Prims = new Dictionary<LLUUID, Primitive>(); 76 Prims = new Dictionary<LLUUID, Primitive>();
77 77
78 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs - creating LandMap"); 78 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs - creating LandMap");
79 TerrainManager = new TerrainManager(new SecondLife()); 79 TerrainManager = new TerrainManager(new SecondLife());
80 Terrain = new TerrainEngine(); 80 Terrain = new TerrainEngine();
81 Avatar.SetupTemplate("avatar-texture.dat"); 81 Avatar.SetupTemplate("avatar-texture.dat");
@@ -88,7 +88,7 @@ namespace OpenSim.world
88 } 88 }
89 catch (Exception e) 89 catch (Exception e)
90 { 90 {
91 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL,"World.cs: Constructor failed with exception " + e.ToString()); 91 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL, "World.cs: Constructor failed with exception " + e.ToString());
92 } 92 }
93 } 93 }
94 #endregion 94 #endregion
@@ -108,7 +108,7 @@ namespace OpenSim.world
108 } 108 }
109 catch (Exception e) 109 catch (Exception e)
110 { 110 {
111 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: AddScript() - Failed with exception " + e.ToString()); 111 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddScript() - Failed with exception " + e.ToString());
112 } 112 }
113 } 113 }
114 114
@@ -160,7 +160,7 @@ namespace OpenSim.world
160 } 160 }
161 catch (Exception e) 161 catch (Exception e)
162 { 162 {
163 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: AddScript() - Failed with exception " + e.ToString()); 163 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddScript() - Failed with exception " + e.ToString());
164 } 164 }
165 } 165 }
166 166
@@ -214,7 +214,7 @@ namespace OpenSim.world
214 } 214 }
215 catch (Exception e) 215 catch (Exception e)
216 { 216 {
217 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: Update() - Failed with exception " + e.ToString()); 217 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: Update() - Failed with exception " + e.ToString());
218 } 218 }
219 updateLock.ReleaseMutex(); 219 updateLock.ReleaseMutex();
220 } 220 }
@@ -292,7 +292,7 @@ namespace OpenSim.world
292 } 292 }
293 catch (Exception e) 293 catch (Exception e)
294 { 294 {
295 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); 295 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadStorageDLL() - Failed with exception " + e.ToString());
296 return false; 296 return false;
297 } 297 }
298 } 298 }
@@ -336,7 +336,7 @@ namespace OpenSim.world
336 } 336 }
337 catch (Exception e) 337 catch (Exception e)
338 { 338 {
339 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 339 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
340 } 340 }
341 } 341 }
342 342
@@ -367,7 +367,7 @@ namespace OpenSim.world
367 } 367 }
368 catch (Exception e) 368 catch (Exception e)
369 { 369 {
370 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 370 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
371 } 371 }
372 } 372 }
373 373
@@ -397,7 +397,7 @@ namespace OpenSim.world
397 } 397 }
398 catch (Exception e) 398 catch (Exception e)
399 { 399 {
400 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); 400 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
401 } 401 }
402 } 402 }
403 403
@@ -426,7 +426,7 @@ namespace OpenSim.world
426 } 426 }
427 catch (Exception e) 427 catch (Exception e)
428 { 428 {
429 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); 429 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
430 } 430 }
431 } 431 }
432 #endregion 432 #endregion
@@ -463,12 +463,12 @@ namespace OpenSim.world
463 { 463 {
464 try 464 try
465 { 465 {
466 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: LoadPrimsFromStorage() - Loading primitives"); 466 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: LoadPrimsFromStorage() - Loading primitives");
467 this.localStorage.LoadPrimitives(this); 467 this.localStorage.LoadPrimitives(this);
468 } 468 }
469 catch (Exception e) 469 catch (Exception e)
470 { 470 {
471 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); 471 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString());
472 } 472 }
473 } 473 }
474 474
@@ -484,24 +484,29 @@ namespace OpenSim.world
484 { 484 {
485 _primCount = prim.LocalID + 1; 485 _primCount = prim.LocalID + 1;
486 } 486 }
487 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs: PrimFromStorage() - Reloading prim (localId " + prim.LocalID + " ) from storage"); 487 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: PrimFromStorage() - Reloading prim (localId " + prim.LocalID + " ) from storage");
488 Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this); 488 Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this);
489 nPrim.CreateFromStorage(prim); 489 nPrim.CreateFromStorage(prim);
490 this.Entities.Add(nPrim.uuid, nPrim); 490 this.Entities.Add(nPrim.uuid, nPrim);
491 } 491 }
492 catch (Exception e) 492 catch (Exception e)
493 { 493 {
494 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: PrimFromStorage() - Failed with exception " + e.ToString()); 494 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: PrimFromStorage() - Failed with exception " + e.ToString());
495 } 495 }
496 } 496 }
497 497
498 public void AddNewPrim(ObjectAddPacket addPacket, SimClient AgentClient) 498 public void AddNewPrim(ObjectAddPacket addPacket, SimClient AgentClient)
499 { 499 {
500 AddNewPrim(addPacket, AgentClient.AgentID);
501 }
502
503 public void AddNewPrim(ObjectAddPacket addPacket, LLUUID ownerID)
504 {
500 try 505 try
501 { 506 {
502 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: AddNewPrim() - Creating new prim"); 507 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: AddNewPrim() - Creating new prim");
503 Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this); 508 Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this);
504 prim.CreateFromPacket(addPacket, AgentClient.AgentID, this._primCount); 509 prim.CreateFromPacket(addPacket, ownerID, this._primCount);
505 PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z); 510 PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z);
506 PhysicsVector pSize = new PhysicsVector(0.255f, 0.255f, 0.255f); 511 PhysicsVector pSize = new PhysicsVector(0.255f, 0.255f, 0.255f);
507 if (OpenSim.world.Avatar.PhysicsEngineFlying) 512 if (OpenSim.world.Avatar.PhysicsEngineFlying)
@@ -529,10 +534,10 @@ namespace OpenSim.world
529 { 534 {
530 try 535 try
531 { 536 {
532 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); 537 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
533 Avatar newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20); 538 Avatar newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20);
534 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs:AddViewerAgent() - Adding new avatar to world"); 539 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world");
535 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"World.cs:AddViewerAgent() - Starting RegionHandshake "); 540 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake ");
536 newAvatar.SendRegionHandshake(this); 541 newAvatar.SendRegionHandshake(this);
537 if (!agentClient.m_child) 542 if (!agentClient.m_child)
538 { 543 {
@@ -567,7 +572,7 @@ namespace OpenSim.world
567 } 572 }
568 catch (Exception e) 573 catch (Exception e)
569 { 574 {
570 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: AddViewerAgent() - Failed with exception " + e.ToString()); 575 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddViewerAgent() - Failed with exception " + e.ToString());
571 } 576 }
572 } 577 }
573 578
@@ -590,7 +595,7 @@ namespace OpenSim.world
590 } 595 }
591 catch (Exception e) 596 catch (Exception e)
592 { 597 {
593 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString()); 598 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString());
594 } 599 }
595 } 600 }
596 #endregion 601 #endregion