From 9c1c378aa1b8c4f7738514614cdf8e8b870e7263 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 31 Aug 2010 22:16:23 +0100
Subject: Add ScenePresence.GetAttachments(uint attachmentPoint)
---
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index fbb3177..339d0c4 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3383,6 +3383,27 @@ namespace OpenSim.Region.Framework.Scenes
m_attachments.Add(gobj);
}
}
+
+ ///
+ /// Get the scene object attached to the given point.
+ ///
+ ///
+ /// Returns an empty list if there were no attachments at the point.
+ public List GetAttachments(uint attachmentPoint)
+ {
+ List attachments = new List();
+
+ lock (m_attachments)
+ {
+ foreach (SceneObjectGroup so in m_attachments)
+ {
+ if (attachmentPoint == so.RootPart.AttachmentPoint)
+ attachments.Add(so);
+ }
+ }
+
+ return attachments;
+ }
public bool HasAttachments()
{
--
cgit v1.1
From c47de942637281714c3e85bfc8b3af4405713fd3 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 31 Aug 2010 22:24:11 +0200
Subject: Adjust the "Magic numbers" we use because we can't reference the
actual script state enum to reflect recent changes.
---
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +-
OpenSim/Region/Framework/Scenes/Scene.cs | 2 +-
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 2ac46e2..0674e62 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1940,7 +1940,7 @@ namespace OpenSim.Region.Framework.Scenes
// We can only call this after adding the scene object, since the scene object references the scene
// to find out if scripts should be activated at all.
- group.CreateScriptInstances(param, true, DefaultScriptEngine, 2);
+ group.CreateScriptInstances(param, true, DefaultScriptEngine, 3);
group.ScheduleGroupForFullUpdate();
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index db081cc..56ac2c2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2376,7 +2376,7 @@ namespace OpenSim.Region.Framework.Scenes
return false;
}
- newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 1);
+ newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 2);
newObject.ResumeScripts();
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 2c242c9..e7175c5 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1845,7 +1845,7 @@ namespace OpenSim.Region.Framework.Scenes
copy.UpdateGroupRotationR(rot);
}
- copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 0);
+ copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 1);
copy.HasGroupChanged = true;
copy.ScheduleGroupForFullUpdate();
copy.ResumeScripts();
--
cgit v1.1
From 6cbf66827ba3cb878ab70b75fc4e3221b71d820e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 1 Sep 2010 01:11:52 +0100
Subject: refactor: move SOG.AttachToAgent() into AttachmentsModule
---
.../Region/Framework/Scenes/SceneObjectGroup.cs | 71 ----------------------
1 file changed, 71 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 40a8f83..64a6dd5 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -977,77 +977,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- ///
- /// Attach this scene object to the given avatar.
- ///
- ///
- ///
- ///
- public void AttachToAgent(UUID agentID, uint attachmentpoint, Vector3 AttachOffset, bool silent)
- {
- ScenePresence avatar = m_scene.GetScenePresence(agentID);
- if (avatar != null)
- {
- // don't attach attachments to child agents
- if (avatar.IsChildAgent) return;
-
-// m_log.DebugFormat("[SOG]: Adding attachment {0} to avatar {1}", Name, avatar.Name);
-
- DetachFromBackup();
-
- // Remove from database and parcel prim count
- m_scene.DeleteFromStorage(UUID);
- m_scene.EventManager.TriggerParcelPrimCountTainted();
-
- m_rootPart.AttachedAvatar = agentID;
-
- //Anakin Lohner bug #3839
- lock (m_parts)
- {
- foreach (SceneObjectPart p in m_parts.Values)
- {
- p.AttachedAvatar = agentID;
- }
- }
-
- if (m_rootPart.PhysActor != null)
- {
- m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor);
- m_rootPart.PhysActor = null;
- }
-
- AbsolutePosition = AttachOffset;
- m_rootPart.AttachedPos = AttachOffset;
- m_rootPart.IsAttachment = true;
-
- m_rootPart.SetParentLocalId(avatar.LocalId);
- SetAttachmentPoint(Convert.ToByte(attachmentpoint));
-
- avatar.AddAttachment(this);
-
- if (!silent)
- {
- // Killing it here will cause the client to deselect it
- // It then reappears on the avatar, deselected
- // through the full update below
- //
- if (IsSelected)
- {
- m_scene.SendKillObject(m_rootPart.LocalId);
- }
-
- IsSelected = false; // fudge....
- ScheduleGroupForFullUpdate();
- }
- }
- else
- {
- m_log.WarnFormat(
- "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present",
- UUID, agentID, Scene.RegionInfo.RegionName);
- }
- }
-
public byte GetAttachmentPoint()
{
return m_rootPart.Shape.State;
--
cgit v1.1
From 7720419fc7e74758125dc401eb3258ba5bd9b4f8 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 2 Sep 2010 20:08:39 +0200
Subject: Experimentally comment the sending of unbaked avatars
---
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 339d0c4..facbc97 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2464,7 +2464,9 @@ namespace OpenSim.Region.Framework.Scenes
m_controllingClient.SendAvatarDataImmediate(this);
SendInitialFullUpdateToAllClients();
- SendAppearanceToAllOtherAgents();
+ // Experimentally commenting this. We don't have bakes at this time
+ // and 1.23 will not display an avatar without bakes.
+ //SendAppearanceToAllOtherAgents();
}
///
--
cgit v1.1
From 1c8bc9b7b6a62b38d9378ec08853ab2237c7a53a Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Thu, 2 Sep 2010 20:51:27 +0200
Subject: Remove commented code and the comment, as the change has proven out
---
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 ---
1 file changed, 3 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index facbc97..cc9355e 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2464,9 +2464,6 @@ namespace OpenSim.Region.Framework.Scenes
m_controllingClient.SendAvatarDataImmediate(this);
SendInitialFullUpdateToAllClients();
- // Experimentally commenting this. We don't have bakes at this time
- // and 1.23 will not display an avatar without bakes.
- //SendAppearanceToAllOtherAgents();
}
///
--
cgit v1.1
From 17a26c3701f7e8de8a4fc223c2069798223b245d Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Fri, 3 Sep 2010 03:16:08 +0200
Subject: Fix an issue with rezzing scripted objects.
---
OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index d7767bd..ca089a1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -252,7 +252,7 @@ namespace OpenSim.Region.Framework.Scenes
if (!m_part.ParentGroup.Scene.RegionInfo.RegionSettings.DisableScripts)
{
- if (stateSource == 1 && // Prim crossing
+ if (stateSource == 2 && // Prim crossing
m_part.ParentGroup.Scene.m_trustBinaries)
{
lock (m_items)
@@ -1095,4 +1095,4 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
-}
\ No newline at end of file
+}
--
cgit v1.1