diff options
author | Diva Canto | 2010-09-02 16:36:43 -0700 |
---|---|---|
committer | Diva Canto | 2010-09-02 16:36:43 -0700 |
commit | 21c5377af998bdd2c6a442588195a7af4d21fa48 (patch) | |
tree | 149e6d3dbeb5b3061bd5625763dfb388a50ed47b /OpenSim/Region/Framework/Scenes | |
parent | Quick fix for making global references for gatekeepers that are not domain:po... (diff) | |
parent | Remove commented code and the comment, as the change has proven out (diff) | |
download | opensim-SC-21c5377af998bdd2c6a442588195a7af4d21fa48.zip opensim-SC-21c5377af998bdd2c6a442588195a7af4d21fa48.tar.gz opensim-SC-21c5377af998bdd2c6a442588195a7af4d21fa48.tar.bz2 opensim-SC-21c5377af998bdd2c6a442588195a7af4d21fa48.tar.xz |
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 71 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 22 |
5 files changed, 24 insertions, 75 deletions
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 | |||
1940 | 1940 | ||
1941 | // We can only call this after adding the scene object, since the scene object references the scene | 1941 | // We can only call this after adding the scene object, since the scene object references the scene |
1942 | // to find out if scripts should be activated at all. | 1942 | // to find out if scripts should be activated at all. |
1943 | group.CreateScriptInstances(param, true, DefaultScriptEngine, 2); | 1943 | group.CreateScriptInstances(param, true, DefaultScriptEngine, 3); |
1944 | 1944 | ||
1945 | group.ScheduleGroupForFullUpdate(); | 1945 | group.ScheduleGroupForFullUpdate(); |
1946 | 1946 | ||
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 | |||
2376 | return false; | 2376 | return false; |
2377 | } | 2377 | } |
2378 | 2378 | ||
2379 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 1); | 2379 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 2); |
2380 | 2380 | ||
2381 | newObject.ResumeScripts(); | 2381 | newObject.ResumeScripts(); |
2382 | 2382 | ||
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 | |||
1845 | copy.UpdateGroupRotationR(rot); | 1845 | copy.UpdateGroupRotationR(rot); |
1846 | } | 1846 | } |
1847 | 1847 | ||
1848 | copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 0); | 1848 | copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 1); |
1849 | copy.HasGroupChanged = true; | 1849 | copy.HasGroupChanged = true; |
1850 | copy.ScheduleGroupForFullUpdate(); | 1850 | copy.ScheduleGroupForFullUpdate(); |
1851 | copy.ResumeScripts(); | 1851 | copy.ResumeScripts(); |
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 | |||
977 | } | 977 | } |
978 | } | 978 | } |
979 | 979 | ||
980 | /// <summary> | ||
981 | /// Attach this scene object to the given avatar. | ||
982 | /// </summary> | ||
983 | /// <param name="agentID"></param> | ||
984 | /// <param name="attachmentpoint"></param> | ||
985 | /// <param name="AttachOffset"></param> | ||
986 | public void AttachToAgent(UUID agentID, uint attachmentpoint, Vector3 AttachOffset, bool silent) | ||
987 | { | ||
988 | ScenePresence avatar = m_scene.GetScenePresence(agentID); | ||
989 | if (avatar != null) | ||
990 | { | ||
991 | // don't attach attachments to child agents | ||
992 | if (avatar.IsChildAgent) return; | ||
993 | |||
994 | // m_log.DebugFormat("[SOG]: Adding attachment {0} to avatar {1}", Name, avatar.Name); | ||
995 | |||
996 | DetachFromBackup(); | ||
997 | |||
998 | // Remove from database and parcel prim count | ||
999 | m_scene.DeleteFromStorage(UUID); | ||
1000 | m_scene.EventManager.TriggerParcelPrimCountTainted(); | ||
1001 | |||
1002 | m_rootPart.AttachedAvatar = agentID; | ||
1003 | |||
1004 | //Anakin Lohner bug #3839 | ||
1005 | lock (m_parts) | ||
1006 | { | ||
1007 | foreach (SceneObjectPart p in m_parts.Values) | ||
1008 | { | ||
1009 | p.AttachedAvatar = agentID; | ||
1010 | } | ||
1011 | } | ||
1012 | |||
1013 | if (m_rootPart.PhysActor != null) | ||
1014 | { | ||
1015 | m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor); | ||
1016 | m_rootPart.PhysActor = null; | ||
1017 | } | ||
1018 | |||
1019 | AbsolutePosition = AttachOffset; | ||
1020 | m_rootPart.AttachedPos = AttachOffset; | ||
1021 | m_rootPart.IsAttachment = true; | ||
1022 | |||
1023 | m_rootPart.SetParentLocalId(avatar.LocalId); | ||
1024 | SetAttachmentPoint(Convert.ToByte(attachmentpoint)); | ||
1025 | |||
1026 | avatar.AddAttachment(this); | ||
1027 | |||
1028 | if (!silent) | ||
1029 | { | ||
1030 | // Killing it here will cause the client to deselect it | ||
1031 | // It then reappears on the avatar, deselected | ||
1032 | // through the full update below | ||
1033 | // | ||
1034 | if (IsSelected) | ||
1035 | { | ||
1036 | m_scene.SendKillObject(m_rootPart.LocalId); | ||
1037 | } | ||
1038 | |||
1039 | IsSelected = false; // fudge.... | ||
1040 | ScheduleGroupForFullUpdate(); | ||
1041 | } | ||
1042 | } | ||
1043 | else | ||
1044 | { | ||
1045 | m_log.WarnFormat( | ||
1046 | "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present", | ||
1047 | UUID, agentID, Scene.RegionInfo.RegionName); | ||
1048 | } | ||
1049 | } | ||
1050 | |||
1051 | public byte GetAttachmentPoint() | 980 | public byte GetAttachmentPoint() |
1052 | { | 981 | { |
1053 | return m_rootPart.Shape.State; | 982 | return m_rootPart.Shape.State; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fbb3177..cc9355e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2464,7 +2464,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2464 | m_controllingClient.SendAvatarDataImmediate(this); | 2464 | m_controllingClient.SendAvatarDataImmediate(this); |
2465 | 2465 | ||
2466 | SendInitialFullUpdateToAllClients(); | 2466 | SendInitialFullUpdateToAllClients(); |
2467 | SendAppearanceToAllOtherAgents(); | ||
2468 | } | 2467 | } |
2469 | 2468 | ||
2470 | /// <summary> | 2469 | /// <summary> |
@@ -3383,6 +3382,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
3383 | m_attachments.Add(gobj); | 3382 | m_attachments.Add(gobj); |
3384 | } | 3383 | } |
3385 | } | 3384 | } |
3385 | |||
3386 | /// <summary> | ||
3387 | /// Get the scene object attached to the given point. | ||
3388 | /// </summary> | ||
3389 | /// <param name="attachmentPoint"></param> | ||
3390 | /// <returns>Returns an empty list if there were no attachments at the point.</returns> | ||
3391 | public List<SceneObjectGroup> GetAttachments(uint attachmentPoint) | ||
3392 | { | ||
3393 | List<SceneObjectGroup> attachments = new List<SceneObjectGroup>(); | ||
3394 | |||
3395 | lock (m_attachments) | ||
3396 | { | ||
3397 | foreach (SceneObjectGroup so in m_attachments) | ||
3398 | { | ||
3399 | if (attachmentPoint == so.RootPart.AttachmentPoint) | ||
3400 | attachments.Add(so); | ||
3401 | } | ||
3402 | } | ||
3403 | |||
3404 | return attachments; | ||
3405 | } | ||
3386 | 3406 | ||
3387 | public bool HasAttachments() | 3407 | public bool HasAttachments() |
3388 | { | 3408 | { |