aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/General/NpcClientBase.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs2
-rw-r--r--OpenSim/Region/Environment/ParcelManager.cs16
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs32
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs3
-rw-r--r--OpenSim/Region/Examples/SimpleApp/Program.cs2
6 files changed, 50 insertions, 7 deletions
diff --git a/OpenSim/Framework/General/NpcClientBase.cs b/OpenSim/Framework/General/NpcClientBase.cs
index 2fe3eed..44d6d3c 100644
--- a/OpenSim/Framework/General/NpcClientBase.cs
+++ b/OpenSim/Framework/General/NpcClientBase.cs
@@ -57,6 +57,8 @@ namespace OpenSim.Framework
57 public event ParcelJoinRequest OnParcelJoinRequest; 57 public event ParcelJoinRequest OnParcelJoinRequest;
58 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 58 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
59 public event ParcelSelectObjects OnParcelSelectObjects; 59 public event ParcelSelectObjects OnParcelSelectObjects;
60 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
61 public event ObjectDeselect OnObjectDeselect;
60 62
61 63
62 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 64 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 0016d15..99164f1 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -240,7 +240,7 @@ namespace OpenSim
240 scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero; 240 scene.RegionInfo.MasterAvatarAssignedUUID = libsecondlife.LLUUID.Zero;
241 scene.localStorage.LoadParcels((ILocalStorageParcelReceiver)scene.ParcelManager); 241 scene.localStorage.LoadParcels((ILocalStorageParcelReceiver)scene.ParcelManager);
242 } 242 }
243 LocalWorld.performParcelPrimCountUpdate(); 243 scene.performParcelPrimCountUpdate();
244 scene.StartTimer(); 244 scene.StartTimer();
245 } 245 }
246 } 246 }
diff --git a/OpenSim/Region/Environment/ParcelManager.cs b/OpenSim/Region/Environment/ParcelManager.cs
index e413650..31b9b1d 100644
--- a/OpenSim/Region/Environment/ParcelManager.cs
+++ b/OpenSim/Region/Environment/ParcelManager.cs
@@ -1024,6 +1024,7 @@ namespace OpenSim.Region.Environment
1024 } 1024 }
1025 #endregion 1025 #endregion
1026 1026
1027 #region Object Select and Object Owner Listing
1027 public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client) 1028 public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client)
1028 { 1029 {
1029 List<uint> resultLocalIDs = new List<uint>(); 1030 List<uint> resultLocalIDs = new List<uint>();
@@ -1123,6 +1124,19 @@ namespace OpenSim.Region.Environment
1123 remote_client.OutPacket(pack); 1124 remote_client.OutPacket(pack);
1124 } 1125 }
1125 } 1126 }
1127 #endregion
1128
1129 #region Object Returning
1130 public void returnObject(SceneObject obj)
1131 {
1132 }
1133 public void returnParcelObjects(int type, LLUUID owner)
1134 {
1135
1136 }
1137 #endregion
1138
1139 #region Object Adding/Removing from Parcel
1126 public void resetParcelPrimCounts() 1140 public void resetParcelPrimCounts()
1127 { 1141 {
1128 parcelData.groupPrims = 0; 1142 parcelData.groupPrims = 0;
@@ -1180,7 +1194,7 @@ namespace OpenSim.Region.Environment
1180 primsOverMe.Remove(obj); 1194 primsOverMe.Remove(obj);
1181 } 1195 }
1182 } 1196 }
1183 1197 #endregion
1184 1198
1185 #endregion 1199 #endregion
1186 1200
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index ba57115..1e69c9e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -155,7 +155,7 @@ namespace OpenSim.Region.Environment.Scenes
155 List<SceneObject> PrimsFromDB = storageManager.DataStore.LoadObjects(); 155 List<SceneObject> PrimsFromDB = storageManager.DataStore.LoadObjects();
156 foreach (SceneObject prim in PrimsFromDB) 156 foreach (SceneObject prim in PrimsFromDB)
157 { 157 {
158 Prims.Add(prim.uuid, prim); 158 AddEntity(prim);
159 } 159 }
160 MainLog.Instance.Verbose("World.cs - loaded " + PrimsFromDB.Count.ToString() + " object(s)"); 160 MainLog.Instance.Verbose("World.cs - loaded " + PrimsFromDB.Count.ToString() + " object(s)");
161 161
@@ -483,14 +483,40 @@ namespace OpenSim.Region.Environment.Scenes
483 { 483 {
484 484
485 SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, this.PrimIDAllocate(), pos, shape); 485 SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, this.PrimIDAllocate(), pos, shape);
486 AddNewEntity(sceneOb); 486 AddEntity(sceneOb);
487 } 487 }
488 488
489 public void AddNewEntity(SceneObject sceneObject) 489 public void RemovePrim(uint localID, LLUUID avatar_deleter)
490 {
491 foreach (EntityBase obj in Entities.Values)
492 {
493 if (obj is SceneObject)
494 {
495 if (((SceneObject)obj).LocalId == localID)
496 {
497 RemoveEntity((SceneObject)obj);
498 return;
499 }
500 }
501 }
502
503 }
504
505 public void AddEntity(SceneObject sceneObject)
490 { 506 {
491 this.Entities.Add(sceneObject.rootUUID, sceneObject); 507 this.Entities.Add(sceneObject.rootUUID, sceneObject);
492 } 508 }
493 509
510 public void RemoveEntity(SceneObject sceneObject)
511 {
512 if (this.Entities.ContainsKey(sceneObject.rootUUID))
513 {
514 m_parcelManager.removePrimFromParcelCounts(sceneObject);
515 this.Entities.Remove(sceneObject.rootUUID);
516 m_parcelManager.setPrimsTainted();
517 }
518 }
519
494 /// <summary> 520 /// <summary>
495 /// Called by a prim when it has been created/cloned, so that its events can be subscribed to 521 /// Called by a prim when it has been created/cloned, so that its events can be subscribed to
496 /// </summary> 522 /// </summary>
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index 6b332eb..7e6b1af 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -69,7 +69,8 @@ namespace SimpleApp
69 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 69 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
70 70
71 public event ParcelSelectObjects OnParcelSelectObjects; 71 public event ParcelSelectObjects OnParcelSelectObjects;
72 72 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
73 public event ObjectDeselect OnObjectDeselect;
73 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 74 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
74 75
75 private LLUUID myID = LLUUID.Random(); 76 private LLUUID myID = LLUUID.Random();
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs
index d417851..c3edf0c 100644
--- a/OpenSim/Region/Examples/SimpleApp/Program.cs
+++ b/OpenSim/Region/Examples/SimpleApp/Program.cs
@@ -92,7 +92,7 @@ namespace SimpleApp
92 LLVector3 pos = new LLVector3(138, 129, 27); 92 LLVector3 pos = new LLVector3(138, 129, 27);
93 93
94 m_sceneObject = new MySceneObject(world, world.EventManager, LLUUID.Zero, world.PrimIDAllocate(), pos, shape); 94 m_sceneObject = new MySceneObject(world, world.EventManager, LLUUID.Zero, world.PrimIDAllocate(), pos, shape);
95 world.AddNewEntity(m_sceneObject); 95 world.AddEntity(m_sceneObject);
96 96
97 m_character = new MyNpcCharacter(); 97 m_character = new MyNpcCharacter();
98 world.AddNewClient(m_character, false); 98 world.AddNewClient(m_character, false);