aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorDiva Canto2013-07-13 09:53:05 -0700
committerDiva Canto2013-07-13 09:53:05 -0700
commitccee2959f73aeaa81b13b25eb1128244b4e9c0f4 (patch)
tree1cea06b53b07982e7e9fbfebf3e4aab6321471fe /OpenSim/Region/Framework/Scenes
parentMoved SendInitialDataToMe to earlier in CompleteMovement. Moved TriggerOnMake... (diff)
parentReinsert PhysicsActor variable back into SOP.SubscribeForCollisionEvents() in... (diff)
downloadopensim-SC_OLD-ccee2959f73aeaa81b13b25eb1128244b4e9c0f4.zip
opensim-SC_OLD-ccee2959f73aeaa81b13b25eb1128244b4e9c0f4.tar.gz
opensim-SC_OLD-ccee2959f73aeaa81b13b25eb1128244b4e9c0f4.tar.bz2
opensim-SC_OLD-ccee2959f73aeaa81b13b25eb1128244b4e9c0f4.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs20
1 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 830fe31..eb3af42 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4272,10 +4272,14 @@ namespace OpenSim.Region.Framework.Scenes
4272// m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags); 4272// m_log.DebugFormat("[SCENE OBJECT PART]: Updated PrimFlags on {0} {1} to {2}", Name, LocalId, Flags);
4273 } 4273 }
4274 4274
4275 // Subscribe for physics collision events if needed for scripts and sounds 4275 /// <summary>
4276 /// Subscribe for physics collision events if needed for scripts and sounds
4277 /// </summary>
4276 public void SubscribeForCollisionEvents() 4278 public void SubscribeForCollisionEvents()
4277 { 4279 {
4278 if (PhysActor != null) 4280 PhysicsActor pa = PhysActor;
4281
4282 if (pa != null)
4279 { 4283 {
4280 if ( 4284 if (
4281 ((AggregateScriptEvents & scriptEvents.collision) != 0) || 4285 ((AggregateScriptEvents & scriptEvents.collision) != 0) ||
@@ -4293,20 +4297,20 @@ namespace OpenSim.Region.Framework.Scenes
4293 (CollisionSound != UUID.Zero) 4297 (CollisionSound != UUID.Zero)
4294 ) 4298 )
4295 { 4299 {
4296 if (!PhysActor.SubscribedEvents()) 4300 if (!pa.SubscribedEvents())
4297 { 4301 {
4298 // If not already subscribed for event, set up for a collision event. 4302 // If not already subscribed for event, set up for a collision event.
4299 PhysActor.OnCollisionUpdate += PhysicsCollision; 4303 pa.OnCollisionUpdate += PhysicsCollision;
4300 PhysActor.SubscribeEvents(1000); 4304 pa.SubscribeEvents(1000);
4301 } 4305 }
4302 } 4306 }
4303 else 4307 else
4304 { 4308 {
4305 // There is no need to be subscribed to collisions so, if subscribed, remove subscription 4309 // There is no need to be subscribed to collisions so, if subscribed, remove subscription
4306 if (PhysActor.SubscribedEvents()) 4310 if (pa.SubscribedEvents())
4307 { 4311 {
4308 PhysActor.OnCollisionUpdate -= PhysicsCollision; 4312 pa.OnCollisionUpdate -= PhysicsCollision;
4309 PhysActor.UnSubscribeEvents(); 4313 pa.UnSubscribeEvents();
4310 } 4314 }
4311 } 4315 }
4312 } 4316 }