diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
5 files changed, 32 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 35ac908..36d46b8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -38,8 +38,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
38 | { | 38 | { |
39 | public partial class Scene | 39 | public partial class Scene |
40 | { | 40 | { |
41 | |||
41 | protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, | 42 | protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, |
42 | UUID fromID, bool fromAgent, bool broadcast) | 43 | UUID fromID, UUID targetID, bool fromAgent, bool broadcast) |
43 | { | 44 | { |
44 | OSChatMessage args = new OSChatMessage(); | 45 | OSChatMessage args = new OSChatMessage(); |
45 | 46 | ||
@@ -63,14 +64,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
63 | } | 64 | } |
64 | 65 | ||
65 | args.From = fromName; | 66 | args.From = fromName; |
66 | //args. | 67 | args.TargetUUID = targetID; |
67 | 68 | ||
68 | if (broadcast) | 69 | if (broadcast) |
69 | EventManager.TriggerOnChatBroadcast(this, args); | 70 | EventManager.TriggerOnChatBroadcast(this, args); |
70 | else | 71 | else |
71 | EventManager.TriggerOnChatFromWorld(this, args); | 72 | EventManager.TriggerOnChatFromWorld(this, args); |
72 | } | 73 | } |
73 | 74 | ||
75 | protected void SimChat(byte[] message, ChatTypeEnum type, int channel, Vector3 fromPos, string fromName, | ||
76 | UUID fromID, bool fromAgent, bool broadcast) | ||
77 | { | ||
78 | SimChat(message, type, channel, fromPos, fromName, fromID, UUID.Zero, fromAgent, broadcast); | ||
79 | } | ||
80 | |||
74 | /// <summary> | 81 | /// <summary> |
75 | /// | 82 | /// |
76 | /// </summary> | 83 | /// </summary> |
@@ -108,6 +115,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
108 | { | 115 | { |
109 | SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true); | 116 | SimChat(message, type, channel, fromPos, fromName, fromID, fromAgent, true); |
110 | } | 117 | } |
118 | /// <summary> | ||
119 | /// | ||
120 | /// </summary> | ||
121 | /// <param name="message"></param> | ||
122 | /// <param name="type"></param> | ||
123 | /// <param name="fromPos"></param> | ||
124 | /// <param name="fromName"></param> | ||
125 | /// <param name="fromAgentID"></param> | ||
126 | /// <param name="targetID"></param> | ||
127 | public void SimChatToAgent(UUID targetID, byte[] message, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent) | ||
128 | { | ||
129 | SimChat(message, ChatTypeEnum.Say, 0, fromPos, fromName, fromID, targetID, fromAgent, false); | ||
130 | } | ||
111 | 131 | ||
112 | /// <summary> | 132 | /// <summary> |
113 | /// Invoked when the client requests a prim. | 133 | /// Invoked when the client requests a prim. |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3e08128..85b1242 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -833,13 +833,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
833 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | 833 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; |
834 | } | 834 | } |
835 | 835 | ||
836 | /// <summary> | ||
837 | /// Mock constructor for scene group persistency unit tests. | ||
838 | /// SceneObjectGroup RegionId property is delegated to Scene. | ||
839 | /// </summary> | ||
840 | /// <param name="regInfo"></param> | ||
841 | public Scene(RegionInfo regInfo) | 836 | public Scene(RegionInfo regInfo) |
842 | { | 837 | { |
838 | PhysicalPrims = true; | ||
839 | CollidablePrims = true; | ||
840 | |||
843 | BordersLocked = true; | 841 | BordersLocked = true; |
844 | Border northBorder = new Border(); | 842 | Border northBorder = new Border(); |
845 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- | 843 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- |
@@ -866,8 +864,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
866 | m_eventManager = new EventManager(); | 864 | m_eventManager = new EventManager(); |
867 | 865 | ||
868 | m_permissions = new ScenePermissions(this); | 866 | m_permissions = new ScenePermissions(this); |
869 | |||
870 | // m_lastUpdate = Util.EnvironmentTickCount(); | ||
871 | } | 867 | } |
872 | 868 | ||
873 | #endregion | 869 | #endregion |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 2882463..8717ed1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2673,7 +2673,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2673 | } | 2673 | } |
2674 | 2674 | ||
2675 | linkPart.LinkNum = linkNum++; | 2675 | linkPart.LinkNum = linkNum++; |
2676 | linkPart.UpdatePrimFlags(UsesPhysics, IsTemporary, IsPhantom, IsVolumeDetect); | 2676 | linkPart.UpdatePrimFlags(UsesPhysics, IsTemporary, IsPhantom, IsVolumeDetect, false); |
2677 | 2677 | ||
2678 | SceneObjectPart[] ogParts = objectGroup.Parts; | 2678 | SceneObjectPart[] ogParts = objectGroup.Parts; |
2679 | Array.Sort(ogParts, delegate(SceneObjectPart a, SceneObjectPart b) | 2679 | Array.Sort(ogParts, delegate(SceneObjectPart a, SceneObjectPart b) |
@@ -2910,7 +2910,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2910 | Quaternion newRot = Quaternion.Inverse(parentRot) * worldRot; | 2910 | Quaternion newRot = Quaternion.Inverse(parentRot) * worldRot; |
2911 | part.RotationOffset = newRot; | 2911 | part.RotationOffset = newRot; |
2912 | 2912 | ||
2913 | part.UpdatePrimFlags(UsesPhysics, IsTemporary, IsPhantom, IsVolumeDetect); | 2913 | part.UpdatePrimFlags(UsesPhysics, IsTemporary, IsPhantom, IsVolumeDetect, false); |
2914 | } | 2914 | } |
2915 | 2915 | ||
2916 | /// <summary> | 2916 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index cd22def..0f7959d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4685,7 +4685,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4685 | } | 4685 | } |
4686 | } | 4686 | } |
4687 | } | 4687 | } |
4688 | |||
4689 | else // it already has a physical representation | 4688 | else // it already has a physical representation |
4690 | { | 4689 | { |
4691 | DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. | 4690 | DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs index 882031c..360566d 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectStatusTests.cs | |||
@@ -62,6 +62,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
62 | { | 62 | { |
63 | TestHelpers.InMethod(); | 63 | TestHelpers.InMethod(); |
64 | 64 | ||
65 | m_scene.AddSceneObject(m_so1); | ||
66 | |||
65 | SceneObjectPart rootPart = m_so1.RootPart; | 67 | SceneObjectPart rootPart = m_so1.RootPart; |
66 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); | 68 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); |
67 | 69 | ||
@@ -80,6 +82,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
80 | { | 82 | { |
81 | TestHelpers.InMethod(); | 83 | TestHelpers.InMethod(); |
82 | 84 | ||
85 | m_scene.AddSceneObject(m_so1); | ||
86 | |||
83 | SceneObjectPart rootPart = m_so1.RootPart; | 87 | SceneObjectPart rootPart = m_so1.RootPart; |
84 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); | 88 | Assert.That(rootPart.Flags, Is.EqualTo(PrimFlags.None)); |
85 | 89 | ||