diff options
author | Melanie | 2012-12-16 21:19:30 +0000 |
---|---|---|
committer | Melanie | 2012-12-16 21:19:30 +0000 |
commit | 0a876a305c32e52d7d0b437c8246119227fce51c (patch) | |
tree | 59772311fcbaf528749b3b9661b252d99f0776ba /OpenSim/Region/Framework/Scenes | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Make WebStatsModule properly handle scenes added or removed after initial sta... (diff) | |
download | opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.zip opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.tar.gz opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.tar.bz2 opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
Diffstat (limited to '')
5 files changed, 66 insertions, 41 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 9458079..d18571c 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -26,9 +26,10 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Threading; | ||
30 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Linq; | ||
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Threading; | ||
32 | using log4net; | 33 | using log4net; |
33 | using OpenMetaverse; | 34 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
@@ -113,6 +114,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
113 | if (m_scenePresence.IsChildAgent) | 114 | if (m_scenePresence.IsChildAgent) |
114 | return; | 115 | return; |
115 | 116 | ||
117 | // m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Removing animation {0} for {1}", animID, m_scenePresence.Name); | ||
118 | |||
116 | if (m_animations.Remove(animID)) | 119 | if (m_animations.Remove(animID)) |
117 | SendAnimPack(); | 120 | SendAnimPack(); |
118 | } | 121 | } |
@@ -519,6 +522,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
519 | if (m_scenePresence.IsChildAgent) | 522 | if (m_scenePresence.IsChildAgent) |
520 | return; | 523 | return; |
521 | 524 | ||
525 | // m_log.DebugFormat( | ||
526 | // "[SCENE PRESENCE ANIMATOR]: Sending anim pack with animations '{0}', sequence '{1}', uuids '{2}'", | ||
527 | // string.Join(",", Array.ConvertAll<UUID, string>(animations, a => a.ToString())), | ||
528 | // string.Join(",", Array.ConvertAll<int, string>(seqs, s => s.ToString())), | ||
529 | // string.Join(",", Array.ConvertAll<UUID, string>(objectIDs, o => o.ToString()))); | ||
530 | |||
522 | m_scenePresence.Scene.ForEachClient( | 531 | m_scenePresence.Scene.ForEachClient( |
523 | delegate(IClientAPI client) | 532 | delegate(IClientAPI client) |
524 | { | 533 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index c9d1205..65c50bf 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -683,12 +683,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
683 | itemCopy.SalePrice = item.SalePrice; | 683 | itemCopy.SalePrice = item.SalePrice; |
684 | itemCopy.SaleType = item.SaleType; | 684 | itemCopy.SaleType = item.SaleType; |
685 | 685 | ||
686 | if (AddInventoryItem(itemCopy)) | 686 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); |
687 | { | 687 | if (invAccess != null) |
688 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); | 688 | invAccess.TransferInventoryAssets(itemCopy, senderId, recipient); |
689 | if (invAccess != null) | 689 | AddInventoryItem(itemCopy); |
690 | Util.FireAndForget(delegate { invAccess.TransferInventoryAssets(itemCopy, senderId, recipient); }); | ||
691 | } | ||
692 | 690 | ||
693 | if (!Permissions.BypassPermissions()) | 691 | if (!Permissions.BypassPermissions()) |
694 | { | 692 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 2191cfa..c746690 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2895,11 +2895,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2895 | 2895 | ||
2896 | public void PhysicsOutOfBounds(Vector3 pos) | 2896 | public void PhysicsOutOfBounds(Vector3 pos) |
2897 | { | 2897 | { |
2898 | m_log.Error("[PHYSICS]: Physical Object went out of bounds."); | 2898 | // Note: This is only being called on the root prim at this time. |
2899 | |||
2900 | m_log.ErrorFormat( | ||
2901 | "[SCENE OBJECT PART]: Physical object {0}, localID {1} went out of bounds at {2} in {3}. Stopping at {4} and making non-physical.", | ||
2902 | Name, LocalId, pos, ParentGroup.Scene.Name, AbsolutePosition); | ||
2899 | 2903 | ||
2900 | RemFlag(PrimFlags.Physics); | 2904 | RemFlag(PrimFlags.Physics); |
2901 | DoPhysicsPropertyUpdate(false, true); | 2905 | DoPhysicsPropertyUpdate(false, true); |
2902 | //ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | ||
2903 | } | 2906 | } |
2904 | 2907 | ||
2905 | public void PhysicsRequestingTerseUpdate() | 2908 | public void PhysicsRequestingTerseUpdate() |
@@ -4549,7 +4552,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4549 | if (ParentGroup.RootPart == this) | 4552 | if (ParentGroup.RootPart == this) |
4550 | AngularVelocity = new Vector3(0, 0, 0); | 4553 | AngularVelocity = new Vector3(0, 0, 0); |
4551 | } | 4554 | } |
4552 | else | 4555 | else if (SetVD != wasVD) |
4553 | { | 4556 | { |
4554 | if (ParentGroup.Scene.CollidablePrims) | 4557 | if (ParentGroup.Scene.CollidablePrims) |
4555 | { | 4558 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7f07d73..1250a11 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -214,8 +214,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
214 | 214 | ||
215 | private Quaternion m_headrotation = Quaternion.Identity; | 215 | private Quaternion m_headrotation = Quaternion.Identity; |
216 | 216 | ||
217 | private string m_nextSitAnimation = String.Empty; | ||
218 | |||
219 | //PauPaw:Proper PID Controler for autopilot************ | 217 | //PauPaw:Proper PID Controler for autopilot************ |
220 | public bool MovingToTarget { get; private set; } | 218 | public bool MovingToTarget { get; private set; } |
221 | public Vector3 MoveToPositionTarget { get; private set; } | 219 | public Vector3 MoveToPositionTarget { get; private set; } |
@@ -2120,25 +2118,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2120 | StandUp(); | 2118 | StandUp(); |
2121 | } | 2119 | } |
2122 | 2120 | ||
2123 | // if (!String.IsNullOrEmpty(sitAnimation)) | ||
2124 | // { | ||
2125 | // m_nextSitAnimation = sitAnimation; | ||
2126 | // } | ||
2127 | // else | ||
2128 | // { | ||
2129 | m_nextSitAnimation = "SIT"; | ||
2130 | // } | ||
2131 | |||
2132 | //SceneObjectPart part = m_scene.GetSceneObjectPart(targetID); | ||
2133 | SceneObjectPart part = FindNextAvailableSitTarget(targetID); | 2121 | SceneObjectPart part = FindNextAvailableSitTarget(targetID); |
2134 | 2122 | ||
2135 | if (part != null) | 2123 | if (part != null) |
2136 | { | 2124 | { |
2137 | if (!String.IsNullOrEmpty(part.SitAnimation)) | ||
2138 | { | ||
2139 | m_nextSitAnimation = part.SitAnimation; | ||
2140 | } | ||
2141 | |||
2142 | m_requestedSitTargetID = part.LocalId; | 2125 | m_requestedSitTargetID = part.LocalId; |
2143 | m_requestedSitTargetUUID = targetID; | 2126 | m_requestedSitTargetUUID = targetID; |
2144 | 2127 | ||
@@ -2353,18 +2336,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2353 | 2336 | ||
2354 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) | 2337 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) |
2355 | { | 2338 | { |
2356 | if (!String.IsNullOrEmpty(m_nextSitAnimation)) | ||
2357 | { | ||
2358 | HandleAgentSit(remoteClient, agentID, m_nextSitAnimation); | ||
2359 | } | ||
2360 | else | ||
2361 | { | ||
2362 | HandleAgentSit(remoteClient, agentID, "SIT"); | ||
2363 | } | ||
2364 | } | ||
2365 | |||
2366 | public void HandleAgentSit(IClientAPI remoteClient, UUID agentID, string sitAnimation) | ||
2367 | { | ||
2368 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); | 2339 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); |
2369 | 2340 | ||
2370 | if (part != null) | 2341 | if (part != null) |
@@ -2436,7 +2407,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2436 | 2407 | ||
2437 | Velocity = Vector3.Zero; | 2408 | Velocity = Vector3.Zero; |
2438 | RemoveFromPhysicalScene(); | 2409 | RemoveFromPhysicalScene(); |
2439 | 2410 | ||
2411 | String sitAnimation = "SIT"; | ||
2412 | if (!String.IsNullOrEmpty(part.SitAnimation)) | ||
2413 | { | ||
2414 | sitAnimation = part.SitAnimation; | ||
2415 | } | ||
2440 | Animator.TrySetMovementAnimation(sitAnimation); | 2416 | Animator.TrySetMovementAnimation(sitAnimation); |
2441 | SendAvatarDataToAllAgents(); | 2417 | SendAvatarDataToAllAgents(); |
2442 | } | 2418 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs index 093cbd2..8eb3191 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs | |||
@@ -78,6 +78,26 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
78 | } | 78 | } |
79 | 79 | ||
80 | [Test] | 80 | [Test] |
81 | public void TestSetNonPhysicsVolumeDetectSinglePrim() | ||
82 | { | ||
83 | TestHelpers.InMethod(); | ||
84 | |||
85 | m_scene.AddSceneObject(m_so1); | ||
86 | |||
87 | SceneObjectPart rootPart = m_so1.RootPart; | ||
88 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); | ||
89 | |||
90 | m_so1.ScriptSetVolumeDetect(true); | ||
91 | |||
92 | // Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags); | ||
93 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Phantom)); | ||
94 | |||
95 | m_so1.ScriptSetVolumeDetect(false); | ||
96 | |||
97 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); | ||
98 | } | ||
99 | |||
100 | [Test] | ||
81 | public void TestSetPhysicsSinglePrim() | 101 | public void TestSetPhysicsSinglePrim() |
82 | { | 102 | { |
83 | TestHelpers.InMethod(); | 103 | TestHelpers.InMethod(); |
@@ -89,13 +109,32 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
89 | 109 | ||
90 | m_so1.ScriptSetPhysicsStatus(true); | 110 | m_so1.ScriptSetPhysicsStatus(true); |
91 | 111 | ||
92 | // Console.WriteLine("so.RootPart.Flags [{0}]", so.RootPart.Flags); | ||
93 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics)); | 112 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics)); |
94 | 113 | ||
95 | m_so1.ScriptSetPhysicsStatus(false); | 114 | m_so1.ScriptSetPhysicsStatus(false); |
96 | 115 | ||
97 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); | 116 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); |
98 | } | 117 | } |
118 | |||
119 | [Test] | ||
120 | public void TestSetPhysicsVolumeDetectSinglePrim() | ||
121 | { | ||
122 | TestHelpers.InMethod(); | ||
123 | |||
124 | m_scene.AddSceneObject(m_so1); | ||
125 | |||
126 | SceneObjectPart rootPart = m_so1.RootPart; | ||
127 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); | ||
128 | |||
129 | m_so1.ScriptSetPhysicsStatus(true); | ||
130 | m_so1.ScriptSetVolumeDetect(true); | ||
131 | |||
132 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Phantom | PrimFlags.Physics)); | ||
133 | |||
134 | m_so1.ScriptSetVolumeDetect(false); | ||
135 | |||
136 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.Physics)); | ||
137 | } | ||
99 | 138 | ||
100 | [Test] | 139 | [Test] |
101 | public void TestSetPhysicsLinkset() | 140 | public void TestSetPhysicsLinkset() |