diff options
author | UbitUmarov | 2016-08-28 08:45:09 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-28 08:45:09 +0100 |
commit | ddc2f2ccd3566a9a4a3631c872979aa6830dbcfe (patch) | |
tree | 24c51a69f8b0e5d17f35501b37659843cf0a4bbe /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | let mouse steer work on crossings; some cleanup (diff) | |
download | opensim-SC_OLD-ddc2f2ccd3566a9a4a3631c872979aa6830dbcfe.zip opensim-SC_OLD-ddc2f2ccd3566a9a4a3631c872979aa6830dbcfe.tar.gz opensim-SC_OLD-ddc2f2ccd3566a9a4a3631c872979aa6830dbcfe.tar.bz2 opensim-SC_OLD-ddc2f2ccd3566a9a4a3631c872979aa6830dbcfe.tar.xz |
mantis: 8008 unscripted child prim collisions didn't trigger scripted root prim collision events; collision sounds had incorrect aggregateevents call and default sounds where muted. Future optimization needed and Testing
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 9b7374c..b7c5b6b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2112,6 +2112,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2112 | d.AddActiveScripts(count); | 2112 | d.AddActiveScripts(count); |
2113 | } | 2113 | } |
2114 | 2114 | ||
2115 | private const scriptEvents PhysicsNeeedSubsEvents = ( | ||
2116 | scriptEvents.collision | scriptEvents.collision_start | scriptEvents.collision_end | | ||
2117 | scriptEvents.land_collision | scriptEvents.land_collision_start | scriptEvents.land_collision_end); | ||
2118 | |||
2119 | private scriptEvents lastRootPartPhysEvents = 0; | ||
2120 | |||
2115 | public void aggregateScriptEvents() | 2121 | public void aggregateScriptEvents() |
2116 | { | 2122 | { |
2117 | PrimFlags objectflagupdate = (PrimFlags)RootPart.GetEffectiveObjectFlags(); | 2123 | PrimFlags objectflagupdate = (PrimFlags)RootPart.GetEffectiveObjectFlags(); |
@@ -2148,6 +2154,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
2148 | m_scene.RemoveGroupTarget(this); | 2154 | m_scene.RemoveGroupTarget(this); |
2149 | } | 2155 | } |
2150 | 2156 | ||
2157 | scriptEvents rootPartPhysEvents = RootPart.AggregateScriptEvents; | ||
2158 | rootPartPhysEvents &= PhysicsNeeedSubsEvents; | ||
2159 | if (rootPartPhysEvents != lastRootPartPhysEvents) | ||
2160 | { | ||
2161 | lastRootPartPhysEvents = rootPartPhysEvents; | ||
2162 | for (int i = 0; i < parts.Length; i++) | ||
2163 | { | ||
2164 | SceneObjectPart part = parts[i]; | ||
2165 | if (part == null) | ||
2166 | continue; | ||
2167 | part.UpdatePhysicsSubscribedEvents(); | ||
2168 | } | ||
2169 | } | ||
2170 | |||
2151 | ScheduleGroupForFullUpdate(); | 2171 | ScheduleGroupForFullUpdate(); |
2152 | } | 2172 | } |
2153 | 2173 | ||