diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneBase.cs | 28 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 |
4 files changed, 38 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3e20766..933999e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2149,7 +2149,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2149 | } | 2149 | } |
2150 | 2150 | ||
2151 | /// <summary> | 2151 | /// <summary> |
2152 | /// Delete every object from the scene | 2152 | /// Delete every object from the scene. This does not include attachments worn by avatars. |
2153 | /// </summary> | 2153 | /// </summary> |
2154 | public void DeleteAllSceneObjects() | 2154 | public void DeleteAllSceneObjects() |
2155 | { | 2155 | { |
@@ -2160,7 +2160,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2160 | foreach (EntityBase e in entities) | 2160 | foreach (EntityBase e in entities) |
2161 | { | 2161 | { |
2162 | if (e is SceneObjectGroup) | 2162 | if (e is SceneObjectGroup) |
2163 | DeleteSceneObject((SceneObjectGroup)e, false); | 2163 | { |
2164 | SceneObjectGroup sog = (SceneObjectGroup)e; | ||
2165 | if (!sog.IsAttachment) | ||
2166 | DeleteSceneObject((SceneObjectGroup)e, false); | ||
2167 | } | ||
2164 | } | 2168 | } |
2165 | } | 2169 | } |
2166 | } | 2170 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index bfc19b7..ee17fbf 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs | |||
@@ -376,6 +376,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
376 | /// <param name="mod"></param> | 376 | /// <param name="mod"></param> |
377 | public void RegisterModuleInterface<M>(M mod) | 377 | public void RegisterModuleInterface<M>(M mod) |
378 | { | 378 | { |
379 | m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M)); | ||
380 | |||
379 | List<Object> l = null; | 381 | List<Object> l = null; |
380 | if (!ModuleInterfaces.TryGetValue(typeof(M), out l)) | 382 | if (!ModuleInterfaces.TryGetValue(typeof(M), out l)) |
381 | { | 383 | { |
@@ -498,8 +500,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
498 | } | 500 | } |
499 | } | 501 | } |
500 | 502 | ||
503 | /// <summary> | ||
504 | /// Call this from a region module to add a command to the OpenSim console. | ||
505 | /// </summary> | ||
506 | /// <param name="mod"></param> | ||
507 | /// <param name="command"></param> | ||
508 | /// <param name="shorthelp"></param> | ||
509 | /// <param name="longhelp"></param> | ||
510 | /// <param name="callback"></param> | ||
501 | public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback) | 511 | public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback) |
502 | { | 512 | { |
513 | AddCommand(mod, command, shorthelp, longhelp, string.Empty, callback); | ||
514 | } | ||
515 | |||
516 | /// <summary> | ||
517 | /// Call this from a region module to add a command to the OpenSim console. | ||
518 | /// </summary> | ||
519 | /// <param name="mod"></param> | ||
520 | /// <param name="command"></param> | ||
521 | /// <param name="shorthelp"></param> | ||
522 | /// <param name="longhelp"></param> | ||
523 | /// <param name="descriptivehelp"></param> | ||
524 | /// <param name="callback"></param> | ||
525 | public void AddCommand( | ||
526 | object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback) | ||
527 | { | ||
503 | if (MainConsole.Instance == null) | 528 | if (MainConsole.Instance == null) |
504 | return; | 529 | return; |
505 | 530 | ||
@@ -523,7 +548,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
523 | else throw new Exception("AddCommand module parameter must be IRegionModule or IRegionModuleBase"); | 548 | else throw new Exception("AddCommand module parameter must be IRegionModule or IRegionModuleBase"); |
524 | } | 549 | } |
525 | 550 | ||
526 | MainConsole.Instance.Commands.AddCommand(modulename, shared, command, shorthelp, longhelp, callback); | 551 | MainConsole.Instance.Commands.AddCommand( |
552 | modulename, shared, command, shorthelp, longhelp, descriptivehelp, callback); | ||
527 | } | 553 | } |
528 | 554 | ||
529 | public virtual ISceneObject DeserializeObject(string representation) | 555 | public virtual ISceneObject DeserializeObject(string representation) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 683df93..c84596b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1289,10 +1289,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1289 | { | 1289 | { |
1290 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | 1290 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) |
1291 | { | 1291 | { |
1292 | avatar.SceneViewer.QueuePartForUpdate(this); | 1292 | AddFullUpdateToAvatar(avatar); |
1293 | }); | 1293 | }); |
1294 | } | 1294 | } |
1295 | 1295 | ||
1296 | /// <summary> | ||
1297 | /// Tell the scene presence that it should send updates for this part to its client | ||
1298 | /// </summary> | ||
1296 | public void AddFullUpdateToAvatar(ScenePresence presence) | 1299 | public void AddFullUpdateToAvatar(ScenePresence presence) |
1297 | { | 1300 | { |
1298 | presence.SceneViewer.QueuePartForUpdate(this); | 1301 | presence.SceneViewer.QueuePartForUpdate(this); |
@@ -1313,7 +1316,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1313 | { | 1316 | { |
1314 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | 1317 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) |
1315 | { | 1318 | { |
1316 | avatar.SceneViewer.QueuePartForUpdate(this); | 1319 | AddTerseUpdateToAvatar(avatar); |
1317 | }); | 1320 | }); |
1318 | } | 1321 | } |
1319 | 1322 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d7660fd..e3bbe8a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -820,15 +820,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
820 | 820 | ||
821 | #endregion | 821 | #endregion |
822 | 822 | ||
823 | /// <summary> | ||
824 | /// Add the part to the queue of parts for which we need to send an update to the client | ||
825 | /// </summary> | ||
826 | /// <param name="part"></param> | ||
827 | public void QueuePartForUpdate(SceneObjectPart part) | ||
828 | { | ||
829 | m_sceneViewer.QueuePartForUpdate(part); | ||
830 | } | ||
831 | |||
832 | public uint GenerateClientFlags(UUID ObjectID) | 823 | public uint GenerateClientFlags(UUID ObjectID) |
833 | { | 824 | { |
834 | return m_scene.Permissions.GenerateClientFlags(m_uuid, ObjectID); | 825 | return m_scene.Permissions.GenerateClientFlags(m_uuid, ObjectID); |