diff options
author | John Hurliman | 2009-10-16 10:09:19 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-16 10:09:19 -0700 |
commit | 06354a093d926e87236c5840e84f5ef9d518c1e0 (patch) | |
tree | ea9f00b5a4e979eb284cf941d0dfa3ceff648b4f /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Object update prioritization by Jim Greensky of Intel Labs, part one. This im... (diff) | |
parent | Merge branch 'master' of ssh://melanie@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-06354a093d926e87236c5840e84f5ef9d518c1e0.zip opensim-SC-06354a093d926e87236c5840e84f5ef9d518c1e0.tar.gz opensim-SC-06354a093d926e87236c5840e84f5ef9d518c1e0.tar.bz2 opensim-SC-06354a093d926e87236c5840e84f5ef9d518c1e0.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into prioritization
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a5b88c6..973537e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -902,6 +902,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
902 | if (PhysicsActor != null) | 902 | if (PhysicsActor != null) |
903 | { | 903 | { |
904 | m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; | 904 | m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; |
905 | m_physicsActor.OnOutOfBounds -= OutOfBoundsCall; | ||
905 | m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); | 906 | m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); |
906 | m_physicsActor.UnSubscribeEvents(); | 907 | m_physicsActor.UnSubscribeEvents(); |
907 | m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; | 908 | m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; |
@@ -2500,8 +2501,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2500 | List<ScenePresence> avatars = m_scene.GetAvatars(); | 2501 | List<ScenePresence> avatars = m_scene.GetAvatars(); |
2501 | for (int i = 0; i < avatars.Count; i++) | 2502 | for (int i = 0; i < avatars.Count; i++) |
2502 | { | 2503 | { |
2503 | if (avatars[i] != this) | 2504 | // Requested by LibOMV. Send Course Location on self. |
2504 | { | 2505 | //if (avatars[i] != this) |
2506 | //{ | ||
2505 | if (avatars[i].ParentID != 0) | 2507 | if (avatars[i].ParentID != 0) |
2506 | { | 2508 | { |
2507 | // sitting avatar | 2509 | // sitting avatar |
@@ -2523,7 +2525,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2523 | CoarseLocations.Add(avatars[i].m_pos); | 2525 | CoarseLocations.Add(avatars[i].m_pos); |
2524 | AvatarUUIDs.Add(avatars[i].UUID); | 2526 | AvatarUUIDs.Add(avatars[i].UUID); |
2525 | } | 2527 | } |
2526 | } | 2528 | //} |
2527 | } | 2529 | } |
2528 | 2530 | ||
2529 | m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations); | 2531 | m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations); |
@@ -3402,11 +3404,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
3402 | scene.AddPhysicsActorTaint(m_physicsActor); | 3404 | scene.AddPhysicsActorTaint(m_physicsActor); |
3403 | //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; | 3405 | //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; |
3404 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; | 3406 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; |
3407 | m_physicsActor.OnOutOfBounds += OutOfBoundsCall; // Called for PhysicsActors when there's something wrong | ||
3405 | m_physicsActor.SubscribeEvents(500); | 3408 | m_physicsActor.SubscribeEvents(500); |
3406 | m_physicsActor.LocalID = LocalId; | 3409 | m_physicsActor.LocalID = LocalId; |
3407 | 3410 | ||
3408 | } | 3411 | } |
3409 | 3412 | ||
3413 | private void OutOfBoundsCall(PhysicsVector pos) | ||
3414 | { | ||
3415 | bool flying = m_physicsActor.Flying; | ||
3416 | RemoveFromPhysicalScene(); | ||
3417 | |||
3418 | AddToPhysicalScene(flying); | ||
3419 | } | ||
3420 | |||
3410 | // Event called by the physics plugin to tell the avatar about a collision. | 3421 | // Event called by the physics plugin to tell the avatar about a collision. |
3411 | private void PhysicsCollisionUpdate(EventArgs e) | 3422 | private void PhysicsCollisionUpdate(EventArgs e) |
3412 | { | 3423 | { |