diff options
author | mingchen | 2007-07-16 14:56:35 +0000 |
---|---|---|
committer | mingchen | 2007-07-16 14:56:35 +0000 |
commit | d216f5779c5f03709d718e279420e13472d08aae (patch) | |
tree | cbd665ef4740520760529cc3532f66c7ef2cdcb0 /OpenSim/Region/Environment | |
parent | * Some minor renamings (diff) | |
download | opensim-SC_OLD-d216f5779c5f03709d718e279420e13472d08aae.zip opensim-SC_OLD-d216f5779c5f03709d718e279420e13472d08aae.tar.gz opensim-SC_OLD-d216f5779c5f03709d718e279420e13472d08aae.tar.bz2 opensim-SC_OLD-d216f5779c5f03709d718e279420e13472d08aae.tar.xz |
*Trunk compiles now
*Added "RemoveEntity" and renamed "AddNewEntity" to "AddEntity"
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/ParcelManager.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 32 |
2 files changed, 44 insertions, 4 deletions
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> |