From 8fb706716ba0162210d6030f3e7b5b6636b35651 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 27 May 2010 20:08:48 +0200
Subject: Prevent a null ref
---
OpenSim/Region/Framework/Scenes/SceneViewer.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneViewer.cs b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
index c6cf4cc..15bc33d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneViewer.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneViewer.cs
@@ -84,6 +84,9 @@ namespace OpenSim.Region.Framework.Scenes
while (m_pendingObjects != null && m_pendingObjects.Count > 0)
{
SceneObjectGroup g = m_pendingObjects.Dequeue();
+ // Yes, this can really happen
+ if (g == null)
+ continue;
// This is where we should check for draw distance
// do culling and stuff. Problem with that is that until
--
cgit v1.1
From 596001632b346f7b57fef746dfcee2cd4bacb2b4 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 28 May 2010 17:53:57 +0100
Subject: remove redundant ScenePresence.QueuePartForUpdate() - every place in
the code calls SceneViewer.QueuePartForUpdate() directly
---
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 ---------
1 file changed, 9 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3964b0b..45375b0 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -784,15 +784,6 @@ namespace OpenSim.Region.Framework.Scenes
#endregion
- ///
- /// Add the part to the queue of parts for which we need to send an update to the client
- ///
- ///
- public void QueuePartForUpdate(SceneObjectPart part)
- {
- m_sceneViewer.QueuePartForUpdate(part);
- }
-
public uint GenerateClientFlags(UUID ObjectID)
{
return m_scene.Permissions.GenerateClientFlags(m_uuid, ObjectID);
--
cgit v1.1
From 877fe774ef718c96c65d9e56c1229338f94c78cb Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 28 May 2010 17:58:51 +0100
Subject: Simplify AddFullUpdateToAvatars()/AddPartialUpdateToAvatars() by
calling the object's corresponding single avatar update method, rather than
calling the sceneviewer directly
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 2357c6b..b36b9bf 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1278,10 +1278,13 @@ namespace OpenSim.Region.Framework.Scenes
{
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
{
- avatar.SceneViewer.QueuePartForUpdate(this);
+ AddFullUpdateToAvatar(avatar);
});
}
+ ///
+ /// Tell the scene presence that it should send updates for this part to its client
+ ///
public void AddFullUpdateToAvatar(ScenePresence presence)
{
presence.SceneViewer.QueuePartForUpdate(this);
@@ -1302,7 +1305,7 @@ namespace OpenSim.Region.Framework.Scenes
{
m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
{
- avatar.SceneViewer.QueuePartForUpdate(this);
+ AddTerseUpdateToAvatar(avatar);
});
}
--
cgit v1.1
From 6b568af5658c07212288429d2e5c77849ffab9e5 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 28 May 2010 18:49:32 +0100
Subject: Adjust Scene.DeleteAllSceneObjects() to not delete objects attached
to avatars.
This is going to be the right behaviour in all cases, I should think.
This means that avatars in region when an oar is loaded do not lose their attachments
---
OpenSim/Region/Framework/Scenes/Scene.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 46fbcd3..6d4de90 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2121,7 +2121,7 @@ namespace OpenSim.Region.Framework.Scenes
}
///
- /// Delete every object from the scene
+ /// Delete every object from the scene. This does not include attachments worn by avatars.
///
public void DeleteAllSceneObjects()
{
@@ -2132,7 +2132,11 @@ namespace OpenSim.Region.Framework.Scenes
foreach (EntityBase e in entities)
{
if (e is SceneObjectGroup)
- DeleteSceneObject((SceneObjectGroup)e, false);
+ {
+ SceneObjectGroup sog = (SceneObjectGroup)e;
+ if (!sog.IsAttachment)
+ DeleteSceneObject((SceneObjectGroup)e, false);
+ }
}
}
}
--
cgit v1.1
From fff5459f4d3a6fcb7acae9e092fd8aae3c74dd7b Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 28 May 2010 20:07:15 +0100
Subject: Add ability to load IARs directly from URIs
So, something like
load iar Justin Clark-Casey / PASSWORD http://justincc.org/downloads/iars/my-great-items.iar
Will load my IAR directly from the web.
---
OpenSim/Region/Framework/Scenes/SceneBase.cs | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index bfc19b7..c363a91 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -498,8 +498,31 @@ namespace OpenSim.Region.Framework.Scenes
}
}
+ ///
+ /// Call this from a region module to add a command to the OpenSim console.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public void AddCommand(object mod, string command, string shorthelp, string longhelp, CommandDelegate callback)
{
+ AddCommand(mod, command, shorthelp, longhelp, string.Empty, callback);
+ }
+
+ ///
+ /// Call this from a region module to add a command to the OpenSim console.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void AddCommand(
+ object mod, string command, string shorthelp, string longhelp, string descriptivehelp, CommandDelegate callback)
+ {
if (MainConsole.Instance == null)
return;
@@ -523,7 +546,8 @@ namespace OpenSim.Region.Framework.Scenes
else throw new Exception("AddCommand module parameter must be IRegionModule or IRegionModuleBase");
}
- MainConsole.Instance.Commands.AddCommand(modulename, shared, command, shorthelp, longhelp, callback);
+ MainConsole.Instance.Commands.AddCommand(
+ modulename, shared, command, shorthelp, longhelp, descriptivehelp, callback);
}
public virtual ISceneObject DeserializeObject(string representation)
--
cgit v1.1
From 191db0e6a4327e8bf84350a541a9edc579ae1c54 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 28 May 2010 23:14:24 +0100
Subject: get TestSaveIarV0_1() uncommented but not running as a test yet since
I didn't get the authentication server to work and my brain is about to
fizzle out my ears
---
OpenSim/Region/Framework/Scenes/SceneBase.cs | 2 ++
1 file changed, 2 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index c363a91..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
///
public void RegisterModuleInterface(M mod)
{
+ m_log.DebugFormat("[SCENE BASE]: Registering interface {0}", typeof(M));
+
List