aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 646a483..c25fa55 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -908,6 +908,7 @@ namespace OpenSim.Region.Framework.Scenes
908 if (PhysicsActor != null) 908 if (PhysicsActor != null)
909 { 909 {
910 m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; 910 m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients;
911 m_physicsActor.OnOutOfBounds -= OutOfBoundsCall;
911 m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); 912 m_scene.PhysicsScene.RemoveAvatar(PhysicsActor);
912 m_physicsActor.UnSubscribeEvents(); 913 m_physicsActor.UnSubscribeEvents();
913 m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; 914 m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate;
@@ -3410,11 +3411,22 @@ namespace OpenSim.Region.Framework.Scenes
3410 scene.AddPhysicsActorTaint(m_physicsActor); 3411 scene.AddPhysicsActorTaint(m_physicsActor);
3411 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; 3412 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
3412 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; 3413 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
3414 m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong
3413 m_physicsActor.SubscribeEvents(500); 3415 m_physicsActor.SubscribeEvents(500);
3414 m_physicsActor.LocalID = LocalId; 3416 m_physicsActor.LocalID = LocalId;
3415 3417
3416 } 3418 }
3417 3419
3420 private void OutOfBoundsCall(PhysicsVector pos)
3421 {
3422 //bool flying = m_physicsActor.Flying;
3423 //RemoveFromPhysicalScene();
3424
3425 //AddToPhysicalScene(flying);
3426 if (ControllingClient != null)
3427 ControllingClient.SendAgentAlertMessage("Physics is having a problem with your avatar. You may not be able to move until you relog.",true);
3428 }
3429
3418 // Event called by the physics plugin to tell the avatar about a collision. 3430 // Event called by the physics plugin to tell the avatar about a collision.
3419 private void PhysicsCollisionUpdate(EventArgs e) 3431 private void PhysicsCollisionUpdate(EventArgs e)
3420 { 3432 {