From 6d3d985511a8e70624c3a06a042890002f223978 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Thu, 15 Oct 2009 02:01:29 -0400 Subject: * Request from lkalif to have the Sim send a coarselocationupdate for each avatar in the sim, including yourself. * Apparently the LLClientView should have been doing this previously.. Also fixed the 'You' on the index block.. so the client doesn't display an extra green dot. * Thanks lkalif for bringing it to our attention. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2a06f9e..646a483 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2507,8 +2507,9 @@ namespace OpenSim.Region.Framework.Scenes List avatars = m_scene.GetAvatars(); for (int i = 0; i < avatars.Count; i++) { - if (avatars[i] != this) - { + // Requested by LibOMV. Send Course Location on self. + //if (avatars[i] != this) + //{ if (avatars[i].ParentID != 0) { // sitting avatar @@ -2530,7 +2531,7 @@ namespace OpenSim.Region.Framework.Scenes CoarseLocations.Add(avatars[i].m_pos); AvatarUUIDs.Add(avatars[i].UUID); } - } + //} } m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations); -- cgit v1.1 From ac2f98b846eba85ab3d9acb5bd0f355a404de86c Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Fri, 16 Oct 2009 03:32:30 -0400 Subject: * A hacky attempt at resolving mantis #4260. I think ODE was unable to allocate memory, and therefore the unmanaged wrapper call fails or worse.. there's some unmanaged resource accounting in the ODEPlugin for ODECharacter that isn't being done properly now. * The broken avatar may not be able to move, but it won't stop simulate from pressing on now. And, the simulator will try to destroy the avatar's physics proxy and recreate it again... but if this is what I think it is, it may not help. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 646a483..96fa467 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3410,11 +3410,20 @@ namespace OpenSim.Region.Framework.Scenes scene.AddPhysicsActorTaint(m_physicsActor); //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; + m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong m_physicsActor.SubscribeEvents(500); m_physicsActor.LocalID = LocalId; } + private void OutOfBoundsCall(PhysicsVector pos) + { + bool flying = m_physicsActor.Flying; + RemoveFromPhysicalScene(); + + AddToPhysicalScene(flying); + } + // Event called by the physics plugin to tell the avatar about a collision. private void PhysicsCollisionUpdate(EventArgs e) { -- cgit v1.1 From 67afa9e633b6b5c9c8be8f50eeecc5177c05119b Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Fri, 16 Oct 2009 03:52:57 -0400 Subject: * Make sure to unregister the OutOfBounds Physics event in RemoveFromPhysicalScene or we'll be leaking --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 96fa467..b468dde 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -908,6 +908,7 @@ namespace OpenSim.Region.Framework.Scenes if (PhysicsActor != null) { m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; + m_physicsActor.OnOutOfBounds -= OutOfBoundsCall; m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); m_physicsActor.UnSubscribeEvents(); m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; -- cgit v1.1