aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs17
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs81
3 files changed, 47 insertions, 53 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index ae37790..0a4906a 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -193,7 +193,7 @@ namespace OpenSim.Region.Environment.Scenes
193 // Is this prim part of the group 193 // Is this prim part of the group
194 if (obj.HasChildPrim(localID)) 194 if (obj.HasChildPrim(localID))
195 { 195 {
196 SceneObjectPart part=obj.GetChildPart(localID); 196 SceneObjectPart part=obj.GetChildPart(localID);
197 if (part != null) 197 if (part != null)
198 { 198 {
199 // If the touched prim handles touches, deliver it 199 // If the touched prim handles touches, deliver it
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 2bc7fd3..033a419 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -186,8 +186,6 @@ namespace OpenSim.Region.Environment.Scenes
186 string.Format("[SCENE OBJECT GROUP]: Object {0} has no root part.", m_uuid)); 186 string.Format("[SCENE OBJECT GROUP]: Object {0} has no root part.", m_uuid));
187 } 187 }
188 188
189
190
191 return m_rootPart.GroupPosition; 189 return m_rootPart.GroupPosition;
192 } 190 }
193 set 191 set
@@ -198,7 +196,6 @@ namespace OpenSim.Region.Environment.Scenes
198 m_scene.CrossPrimGroupIntoNewRegion(val, this); 196 m_scene.CrossPrimGroupIntoNewRegion(val, this);
199 } 197 }
200 198
201
202 lock (m_parts) 199 lock (m_parts)
203 { 200 {
204 foreach (SceneObjectPart part in m_parts.Values) 201 foreach (SceneObjectPart part in m_parts.Values)
@@ -969,19 +966,19 @@ namespace OpenSim.Region.Environment.Scenes
969 966
970 public void aggregateScriptEvents() 967 public void aggregateScriptEvents()
971 { 968 {
972 uint objectflagupdate=(uint)RootPart.GetEffectiveObjectFlags(); 969 uint objectflagupdate=(uint)RootPart.GetEffectiveObjectFlags();
973 970
974 scriptEvents aggregateScriptEvents=0; 971 scriptEvents aggregateScriptEvents=0;
975 972
976 lock (m_parts) 973 lock (m_parts)
977 { 974 {
978 foreach (SceneObjectPart part in m_parts.Values) 975 foreach (SceneObjectPart part in m_parts.Values)
979 { 976 {
980 if(part == null) 977 if (part == null)
981 continue; 978 continue;
982 if(part != RootPart) 979 if (part != RootPart)
983 part.ObjectFlags = objectflagupdate; 980 part.ObjectFlags = objectflagupdate;
984 aggregateScriptEvents |= part.m_aggregateScriptEvents; 981 aggregateScriptEvents |= part.m_aggregateScriptEvents;
985 } 982 }
986 } 983 }
987 984
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 3252b6c..56821c6 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -98,8 +98,8 @@ namespace OpenSim.Region.Environment.Scenes
98 98
99 // TODO: This needs to be persisted in next XML version update! 99 // TODO: This needs to be persisted in next XML version update!
100 [XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2}; 100 [XmlIgnore] public int[] PayPrice = {-2,-2,-2,-2,-2};
101 [XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); 101 [XmlIgnore] private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>();
102 [XmlIgnore] public scriptEvents m_aggregateScriptEvents=0; 102 [XmlIgnore] public scriptEvents m_aggregateScriptEvents=0;
103 [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None; 103 [XmlIgnore] private LLObject.ObjectFlags LocalFlags = LLObject.ObjectFlags.None;
104 [XmlIgnore] public bool DIE_AT_EDGE = false; 104 [XmlIgnore] public bool DIE_AT_EDGE = false;
105 105
@@ -190,10 +190,10 @@ namespace OpenSim.Region.Environment.Scenes
190 set { m_name = value; } 190 set { m_name = value; }
191 } 191 }
192 192
193 public scriptEvents ScriptEvents 193 public scriptEvents ScriptEvents
194 { 194 {
195 get { return m_aggregateScriptEvents; } 195 get { return m_aggregateScriptEvents; }
196 } 196 }
197 197
198 protected LLObject.MaterialType m_material = 0; 198 protected LLObject.MaterialType m_material = 0;
199 199
@@ -211,14 +211,14 @@ namespace OpenSim.Region.Environment.Scenes
211 set { m_regionHandle = value; } 211 set { m_regionHandle = value; }
212 } 212 }
213 213
214 public uint GetEffectiveObjectFlags() 214 public uint GetEffectiveObjectFlags()
215 { 215 {
216 LLObject.ObjectFlags f=Flags; 216 LLObject.ObjectFlags f = Flags;
217 if(m_parentGroup == null || m_parentGroup.RootPart == this) 217 if (m_parentGroup == null || m_parentGroup.RootPart == this)
218 f &= ~(LLObject.ObjectFlags.Touch | LLObject.ObjectFlags.Money); 218 f &= ~(LLObject.ObjectFlags.Touch | LLObject.ObjectFlags.Money);
219 219
220 return (uint)Flags | (uint)LocalFlags; 220 return (uint)Flags | (uint)LocalFlags;
221 } 221 }
222 222
223 //unkown if this will be kept, added as a way of removing the group position from the group class 223 //unkown if this will be kept, added as a way of removing the group position from the group class
224 protected LLVector3 m_groupPosition; 224 protected LLVector3 m_groupPosition;
@@ -2158,14 +2158,14 @@ namespace OpenSim.Region.Environment.Scenes
2158 } 2158 }
2159 } 2159 }
2160 2160
2161 if(soundID == LLUUID.Zero) 2161 if (soundID == LLUUID.Zero)
2162 return; 2162 return;
2163 2163
2164 List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars(); 2164 List<ScenePresence> avatarts = m_parentGroup.Scene.GetAvatars();
2165 foreach (ScenePresence p in avatarts) 2165 foreach (ScenePresence p in avatarts)
2166 { 2166 {
2167 double dis=Util.GetDistanceTo(p.AbsolutePosition, position); 2167 double dis=Util.GetDistanceTo(p.AbsolutePosition, position);
2168 if(dis > 100.0) // Max audio distance 2168 if (dis > 100.0) // Max audio distance
2169 continue; 2169 continue;
2170 2170
2171 // Scale by distance 2171 // Scale by distance
@@ -2623,25 +2623,25 @@ namespace OpenSim.Region.Environment.Scenes
2623 } 2623 }
2624 } 2624 }
2625 2625
2626 public void SetScriptEvents(LLUUID scriptid, int events) 2626 public void SetScriptEvents(LLUUID scriptid, int events)
2627 { 2627 {
2628 scriptEvents oldparts; 2628 scriptEvents oldparts;
2629 lock (m_scriptEvents) 2629 lock (m_scriptEvents)
2630 { 2630 {
2631 if (m_scriptEvents.ContainsKey(scriptid)) 2631 if (m_scriptEvents.ContainsKey(scriptid))
2632 { 2632 {
2633 oldparts = m_scriptEvents[scriptid]; 2633 oldparts = m_scriptEvents[scriptid];
2634 2634
2635 // remove values from aggregated script events 2635 // remove values from aggregated script events
2636 m_scriptEvents[scriptid] = (scriptEvents) events; 2636 m_scriptEvents[scriptid] = (scriptEvents) events;
2637 } 2637 }
2638 else 2638 else
2639 { 2639 {
2640 m_scriptEvents.Add(scriptid, (scriptEvents) events); 2640 m_scriptEvents.Add(scriptid, (scriptEvents) events);
2641 } 2641 }
2642 } 2642 }
2643 aggregateScriptEvents(); 2643 aggregateScriptEvents();
2644 } 2644 }
2645 2645
2646 public void RemoveScriptEvents(LLUUID scriptid) 2646 public void RemoveScriptEvents(LLUUID scriptid)
2647 { 2647 {
@@ -2710,16 +2710,15 @@ namespace OpenSim.Region.Environment.Scenes
2710 } 2710 }
2711 } 2711 }
2712 2712
2713 LocalFlags=(LLObject.ObjectFlags)objectflagupdate; 2713 LocalFlags=(LLObject.ObjectFlags)objectflagupdate;
2714 2714
2715 if(m_parentGroup != null && m_parentGroup.RootPart == this) 2715 if (m_parentGroup != null && m_parentGroup.RootPart == this)
2716 m_parentGroup.aggregateScriptEvents(); 2716 m_parentGroup.aggregateScriptEvents();
2717 else 2717 else
2718 ScheduleFullUpdate(); 2718 ScheduleFullUpdate();
2719 } 2719 }
2720 public void PhysicsCollision(EventArgs e) 2720 public void PhysicsCollision(EventArgs e)
2721 { 2721 {
2722
2723 return; 2722 return;
2724 2723
2725 // 2724 //
@@ -2733,7 +2732,6 @@ namespace OpenSim.Region.Environment.Scenes
2733 //{ 2732 //{
2734 // m_log.Debug("[OBJECT]: Collided with:" + localid.ToString() + " at depth of: " + collissionswith[localid].ToString()); 2733 // m_log.Debug("[OBJECT]: Collided with:" + localid.ToString() + " at depth of: " + collissionswith[localid].ToString());
2735 //} 2734 //}
2736
2737 } 2735 }
2738 2736
2739 public void SetDieAtEdge(bool p) 2737 public void SetDieAtEdge(bool p)
@@ -2755,5 +2753,4 @@ namespace OpenSim.Region.Environment.Scenes
2755 return m_parentGroup.RootPart.DIE_AT_EDGE; 2753 return m_parentGroup.RootPart.DIE_AT_EDGE;
2756 } 2754 }
2757 } 2755 }
2758
2759} 2756}