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.cs199
1 files changed, 162 insertions, 37 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0ab267a..c4876b3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -29,7 +29,9 @@ using System;
29using System.Xml; 29using System.Xml;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using System.Threading;
32using System.Timers; 33using System.Timers;
34using Timer = System.Timers.Timer;
33using OpenMetaverse; 35using OpenMetaverse;
34using log4net; 36using log4net;
35using Nini.Config; 37using Nini.Config;
@@ -78,7 +80,7 @@ namespace OpenSim.Region.Framework.Scenes
78// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name); 80// m_log.DebugFormat("[SCENE PRESENCE]: Destructor called on {0}", Name);
79// } 81// }
80 82
81 private void TriggerScenePresenceUpdated() 83 public void TriggerScenePresenceUpdated()
82 { 84 {
83 if (m_scene != null) 85 if (m_scene != null)
84 m_scene.EventManager.TriggerScenePresenceUpdated(this); 86 m_scene.EventManager.TriggerScenePresenceUpdated(this);
@@ -142,6 +144,8 @@ namespace OpenSim.Region.Framework.Scenes
142 private Vector3 m_lastVelocity; 144 private Vector3 m_lastVelocity;
143 private Vector3 m_lastSize = new Vector3(0.45f,0.6f,1.9f); 145 private Vector3 m_lastSize = new Vector3(0.45f,0.6f,1.9f);
144 146
147 private bool m_followCamAuto = false;
148
145 149
146 private Vector3? m_forceToApply; 150 private Vector3? m_forceToApply;
147 private int m_userFlags; 151 private int m_userFlags;
@@ -760,6 +764,13 @@ namespace OpenSim.Region.Framework.Scenes
760 } 764 }
761 } 765 }
762 766
767 /// <summary>
768 /// Used by the entity transfer module to signal when the presence should not be closed because a subsequent
769 /// teleport is reusing the connection.
770 /// </summary>
771 /// <remarks>May be refactored or move somewhere else soon.</remarks>
772 public bool DoNotCloseAfterTeleport { get; set; }
773
763 private float m_speedModifier = 1.0f; 774 private float m_speedModifier = 1.0f;
764 775
765 public float SpeedModifier 776 public float SpeedModifier
@@ -874,6 +885,7 @@ namespace OpenSim.Region.Framework.Scenes
874 { 885 {
875 ControllingClient.OnCompleteMovementToRegion += CompleteMovement; 886 ControllingClient.OnCompleteMovementToRegion += CompleteMovement;
876 ControllingClient.OnAgentUpdate += HandleAgentUpdate; 887 ControllingClient.OnAgentUpdate += HandleAgentUpdate;
888 ControllingClient.OnAgentCameraUpdate += HandleAgentCamerasUpdate;
877 ControllingClient.OnAgentRequestSit += HandleAgentRequestSit; 889 ControllingClient.OnAgentRequestSit += HandleAgentRequestSit;
878 ControllingClient.OnAgentSit += HandleAgentSit; 890 ControllingClient.OnAgentSit += HandleAgentSit;
879 ControllingClient.OnSetAlwaysRun += HandleSetAlwaysRun; 891 ControllingClient.OnSetAlwaysRun += HandleSetAlwaysRun;
@@ -1153,7 +1165,6 @@ namespace OpenSim.Region.Framework.Scenes
1153 1165
1154 m_scene.EventManager.TriggerOnMakeRootAgent(this); 1166 m_scene.EventManager.TriggerOnMakeRootAgent(this);
1155 1167
1156 m_scene.EventManager.OnRegionHeartbeatEnd += RegionHeartbeatEnd;
1157 } 1168 }
1158 1169
1159 public int GetStateSource() 1170 public int GetStateSource()
@@ -1306,7 +1317,26 @@ namespace OpenSim.Region.Framework.Scenes
1306 1317
1307 public void StopFlying() 1318 public void StopFlying()
1308 { 1319 {
1309 ControllingClient.StopFlying(this); 1320 Vector3 pos = AbsolutePosition;
1321 if (Appearance.AvatarHeight != 127.0f)
1322 pos += new Vector3(0f, 0f, (Appearance.AvatarHeight / 6f));
1323 else
1324 pos += new Vector3(0f, 0f, (1.56f / 6f));
1325
1326 AbsolutePosition = pos;
1327
1328 // attach a suitable collision plane regardless of the actual situation to force the LLClient to land.
1329 // Collision plane below the avatar's position a 6th of the avatar's height is suitable.
1330 // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a
1331 // certain amount.. because the LLClient wouldn't land in that situation anyway.
1332
1333 // why are we still testing for this really old height value default???
1334 if (Appearance.AvatarHeight != 127.0f)
1335 CollisionPlane = new Vector4(0, 0, 0, pos.Z - Appearance.AvatarHeight / 6f);
1336 else
1337 CollisionPlane = new Vector4(0, 0, 0, pos.Z - (1.56f / 6f));
1338
1339 ControllingClient.SendAgentTerseUpdate(this);
1310 } 1340 }
1311 1341
1312 /// <summary> 1342 /// <summary>
@@ -1480,6 +1510,26 @@ namespace OpenSim.Region.Framework.Scenes
1480 1510
1481 } 1511 }
1482 1512
1513 private bool WaitForUpdateAgent(IClientAPI client)
1514 {
1515 // Before UpdateAgent, m_originRegionID is UUID.Zero; after, it's non-Zero
1516 int count = 20;
1517 while (m_originRegionID.Equals(UUID.Zero) && count-- > 0)
1518 {
1519 m_log.DebugFormat("[SCENE PRESENCE]: Agent {0} waiting for update in {1}", client.Name, Scene.RegionInfo.RegionName);
1520 Thread.Sleep(200);
1521 }
1522
1523 if (m_originRegionID.Equals(UUID.Zero))
1524 {
1525 // Movement into region will fail
1526 m_log.WarnFormat("[SCENE PRESENCE]: Update agent {0} never arrived", client.Name);
1527 return false;
1528 }
1529
1530 return true;
1531 }
1532
1483 /// <summary> 1533 /// <summary>
1484 /// Complete Avatar's movement into the region. 1534 /// Complete Avatar's movement into the region.
1485 /// </summary> 1535 /// </summary>
@@ -1497,6 +1547,15 @@ namespace OpenSim.Region.Framework.Scenes
1497 "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}", 1547 "[SCENE PRESENCE]: Completing movement of {0} into region {1} in position {2}",
1498 client.Name, Scene.RegionInfo.RegionName, AbsolutePosition); 1548 client.Name, Scene.RegionInfo.RegionName, AbsolutePosition);
1499 1549
1550 // Make sure it's not a login agent. We don't want to wait for updates during login
1551 if (PresenceType != PresenceType.Npc && (m_teleportFlags & TeleportFlags.ViaLogin) == 0)
1552 {
1553 // Let's wait until UpdateAgent (called by departing region) is done
1554 if (!WaitForUpdateAgent(client))
1555 // The sending region never sent the UpdateAgent data, we have to refuse
1556 return;
1557 }
1558
1500 Vector3 look = Velocity; 1559 Vector3 look = Velocity;
1501 1560
1502 // if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) 1561 // if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
@@ -1518,11 +1577,17 @@ namespace OpenSim.Region.Framework.Scenes
1518 1577
1519 bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); 1578 bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
1520 MakeRootAgent(AbsolutePosition, flying); 1579 MakeRootAgent(AbsolutePosition, flying);
1580
1581 // Tell the client that we're totally ready
1521 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look); 1582 ControllingClient.MoveAgentIntoRegion(m_scene.RegionInfo, AbsolutePosition, look);
1522 1583
1584 // Remember in HandleUseCircuitCode, we delayed this to here
1585 if (m_teleportFlags > 0)
1586 SendInitialDataToMe();
1587
1523// m_log.DebugFormat("[SCENE PRESENCE] Completed movement"); 1588// m_log.DebugFormat("[SCENE PRESENCE] Completed movement");
1524 1589
1525 if ((m_callbackURI != null) && !m_callbackURI.Equals("")) 1590 if (!string.IsNullOrEmpty(m_callbackURI))
1526 { 1591 {
1527 // We cannot sleep here since this would hold up the inbound packet processing thread, as 1592 // We cannot sleep here since this would hold up the inbound packet processing thread, as
1528 // CompleteMovement() is executed synchronously. However, it might be better to delay the release 1593 // CompleteMovement() is executed synchronously. However, it might be better to delay the release
@@ -1550,7 +1615,6 @@ namespace OpenSim.Region.Framework.Scenes
1550 // Create child agents in neighbouring regions 1615 // Create child agents in neighbouring regions
1551 if (openChildAgents && !IsChildAgent) 1616 if (openChildAgents && !IsChildAgent)
1552 { 1617 {
1553
1554 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 1618 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
1555 if (m_agentTransfer != null) 1619 if (m_agentTransfer != null)
1556 m_agentTransfer.EnableChildAgents(this); 1620 m_agentTransfer.EnableChildAgents(this);
@@ -1573,6 +1637,7 @@ namespace OpenSim.Region.Framework.Scenes
1573// m_log.DebugFormat( 1637// m_log.DebugFormat(
1574// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms", 1638// "[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
1575// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds); 1639// client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
1640
1576 } 1641 }
1577 1642
1578 /// <summary> 1643 /// <summary>
@@ -1653,9 +1718,9 @@ namespace OpenSim.Region.Framework.Scenes
1653 /// </summary> 1718 /// </summary>
1654 public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) 1719 public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
1655 { 1720 {
1656// m_log.DebugFormat( 1721 //m_log.DebugFormat(
1657// "[SCENE PRESENCE]: In {0} received agent update from {1}, flags {2}", 1722 // "[SCENE PRESENCE]: In {0} received agent update from {1}, flags {2}",
1658// Scene.RegionInfo.RegionName, remoteClient.Name, (AgentManager.ControlFlags)agentData.ControlFlags); 1723 // Scene.RegionInfo.RegionName, remoteClient.Name, (AgentManager.ControlFlags)agentData.ControlFlags);
1659 1724
1660 if (IsChildAgent) 1725 if (IsChildAgent)
1661 { 1726 {
@@ -1663,10 +1728,6 @@ namespace OpenSim.Region.Framework.Scenes
1663 return; 1728 return;
1664 } 1729 }
1665 1730
1666 ++m_movementUpdateCount;
1667 if (m_movementUpdateCount < 1)
1668 m_movementUpdateCount = 1;
1669
1670 #region Sanity Checking 1731 #region Sanity Checking
1671 1732
1672 // This is irritating. Really. 1733 // This is irritating. Really.
@@ -1697,21 +1758,6 @@ namespace OpenSim.Region.Framework.Scenes
1697 1758
1698 AgentManager.ControlFlags flags = (AgentManager.ControlFlags)agentData.ControlFlags; 1759 AgentManager.ControlFlags flags = (AgentManager.ControlFlags)agentData.ControlFlags;
1699 1760
1700 // Camera location in world. We'll need to raytrace
1701 // from this location from time to time.
1702 CameraPosition = agentData.CameraCenter;
1703 if (Vector3.Distance(m_lastCameraPosition, CameraPosition) >= Scene.RootReprioritizationDistance)
1704 {
1705 ReprioritizeUpdates();
1706 m_lastCameraPosition = CameraPosition;
1707 }
1708
1709 // Use these three vectors to figure out what the agent is looking at
1710 // Convert it to a Matrix and/or Quaternion
1711 CameraAtAxis = agentData.CameraAtAxis;
1712 CameraLeftAxis = agentData.CameraLeftAxis;
1713 CameraUpAxis = agentData.CameraUpAxis;
1714
1715 // The Agent's Draw distance setting 1761 // The Agent's Draw distance setting
1716 // When we get to the point of re-computing neighbors everytime this 1762 // When we get to the point of re-computing neighbors everytime this
1717 // changes, then start using the agent's drawdistance rather than the 1763 // changes, then start using the agent's drawdistance rather than the
@@ -1996,10 +2042,79 @@ namespace OpenSim.Region.Framework.Scenes
1996 SendControlsToScripts(flagsForScripts); 2042 SendControlsToScripts(flagsForScripts);
1997 } 2043 }
1998 2044
2045 // We need to send this back to the client in order to see the edit beams
2046 if ((State & (uint)AgentState.Editing) != 0)
2047 ControllingClient.SendAgentTerseUpdate(this);
2048
1999 m_scene.EventManager.TriggerOnClientMovement(this); 2049 m_scene.EventManager.TriggerOnClientMovement(this);
2000 TriggerScenePresenceUpdated();
2001 } 2050 }
2002 2051
2052
2053 /// <summary>
2054 /// This is the event handler for client cameras. If a client is moving, or moving the camera, this event is triggering.
2055 /// </summary>
2056 private void HandleAgentCamerasUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
2057 {
2058 //m_log.DebugFormat(
2059 // "[SCENE PRESENCE]: In {0} received agent camera update from {1}, flags {2}",
2060 // Scene.RegionInfo.RegionName, remoteClient.Name, (AgentManager.ControlFlags)agentData.ControlFlags);
2061
2062 if (IsChildAgent)
2063 {
2064 // // m_log.Debug("DEBUG: HandleAgentUpdate: child agent");
2065 return;
2066 }
2067
2068 ++m_movementUpdateCount;
2069 if (m_movementUpdateCount < 1)
2070 m_movementUpdateCount = 1;
2071
2072
2073 AgentManager.ControlFlags flags = (AgentManager.ControlFlags)agentData.ControlFlags;
2074
2075 // Camera location in world. We'll need to raytrace
2076 // from this location from time to time.
2077 CameraPosition = agentData.CameraCenter;
2078 if (Vector3.Distance(m_lastCameraPosition, CameraPosition) >= Scene.RootReprioritizationDistance)
2079 {
2080 ReprioritizeUpdates();
2081 m_lastCameraPosition = CameraPosition;
2082 }
2083
2084 // Use these three vectors to figure out what the agent is looking at
2085 // Convert it to a Matrix and/or Quaternion
2086 CameraAtAxis = agentData.CameraAtAxis;
2087 CameraLeftAxis = agentData.CameraLeftAxis;
2088 CameraUpAxis = agentData.CameraUpAxis;
2089
2090 // The Agent's Draw distance setting
2091 // When we get to the point of re-computing neighbors everytime this
2092 // changes, then start using the agent's drawdistance rather than the
2093 // region's draw distance.
2094 // DrawDistance = agentData.Far;
2095 DrawDistance = Scene.DefaultDrawDistance;
2096
2097 // Check if Client has camera in 'follow cam' or 'build' mode.
2098 Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation);
2099
2100 m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f)
2101 && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false;
2102
2103
2104 //m_log.DebugFormat("[FollowCam]: {0}", m_followCamAuto);
2105 // Raycast from the avatar's head to the camera to see if there's anything blocking the view
2106 if ((m_movementUpdateCount % NumMovementsBetweenRayCast) == 0 && m_scene.PhysicsScene.SupportsRayCast())
2107 {
2108 if (m_followCamAuto)
2109 {
2110 Vector3 posAdjusted = m_pos + HEAD_ADJUSTMENT;
2111 m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(CameraPosition - posAdjusted), Vector3.Distance(CameraPosition, posAdjusted) + 0.3f, RayCastCameraCallback);
2112 }
2113 }
2114
2115 TriggerScenePresenceUpdated();
2116 }
2117
2003 /// <summary> 2118 /// <summary>
2004 /// Calculate an update to move the presence to the set target. 2119 /// Calculate an update to move the presence to the set target.
2005 /// </summary> 2120 /// </summary>
@@ -2308,6 +2423,7 @@ namespace OpenSim.Region.Framework.Scenes
2308 AddToPhysicalScene(false); 2423 AddToPhysicalScene(false);
2309 2424
2310 Animator.TrySetMovementAnimation("STAND"); 2425 Animator.TrySetMovementAnimation("STAND");
2426 TriggerScenePresenceUpdated();
2311 } 2427 }
2312 2428
2313 private SceneObjectPart FindNextAvailableSitTarget(UUID targetID) 2429 private SceneObjectPart FindNextAvailableSitTarget(UUID targetID)
@@ -2406,7 +2522,7 @@ namespace OpenSim.Region.Framework.Scenes
2406 ControllingClient.SendSitResponse( 2522 ControllingClient.SendSitResponse(
2407 part.UUID, offset, sitOrientation, false, cameraAtOffset, cameraEyeOffset, forceMouselook); 2523 part.UUID, offset, sitOrientation, false, cameraAtOffset, cameraEyeOffset, forceMouselook);
2408 2524
2409 m_requestedSitTargetUUID = targetID; 2525 m_requestedSitTargetUUID = part.UUID;
2410 2526
2411 HandleAgentSit(ControllingClient, UUID); 2527 HandleAgentSit(ControllingClient, UUID);
2412 2528
@@ -2434,7 +2550,7 @@ namespace OpenSim.Region.Framework.Scenes
2434 if (part != null) 2550 if (part != null)
2435 { 2551 {
2436 m_requestedSitTargetID = part.LocalId; 2552 m_requestedSitTargetID = part.LocalId;
2437 m_requestedSitTargetUUID = targetID; 2553 m_requestedSitTargetUUID = part.UUID;
2438 2554
2439 } 2555 }
2440 else 2556 else
@@ -2633,6 +2749,7 @@ namespace OpenSim.Region.Framework.Scenes
2633 } 2749 }
2634 Animator.TrySetMovementAnimation(sitAnimation); 2750 Animator.TrySetMovementAnimation(sitAnimation);
2635 SendAvatarDataToAllAgents(); 2751 SendAvatarDataToAllAgents();
2752 TriggerScenePresenceUpdated();
2636 } 2753 }
2637 } 2754 }
2638 2755
@@ -2641,6 +2758,7 @@ namespace OpenSim.Region.Framework.Scenes
2641// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.. 2758// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick..
2642 m_AngularVelocity = Vector3.Zero; 2759 m_AngularVelocity = Vector3.Zero;
2643 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); 2760 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
2761 TriggerScenePresenceUpdated();
2644 SitGround = true; 2762 SitGround = true;
2645 RemoveFromPhysicalScene(); 2763 RemoveFromPhysicalScene();
2646 } 2764 }
@@ -2657,11 +2775,13 @@ namespace OpenSim.Region.Framework.Scenes
2657 public void HandleStartAnim(IClientAPI remoteClient, UUID animID) 2775 public void HandleStartAnim(IClientAPI remoteClient, UUID animID)
2658 { 2776 {
2659 Animator.AddAnimation(animID, UUID.Zero); 2777 Animator.AddAnimation(animID, UUID.Zero);
2778 TriggerScenePresenceUpdated();
2660 } 2779 }
2661 2780
2662 public void HandleStopAnim(IClientAPI remoteClient, UUID animID) 2781 public void HandleStopAnim(IClientAPI remoteClient, UUID animID)
2663 { 2782 {
2664 Animator.RemoveAnimation(animID, false); 2783 Animator.RemoveAnimation(animID, false);
2784 TriggerScenePresenceUpdated();
2665 } 2785 }
2666 2786
2667 public void avnHandleChangeAnim(UUID animID, bool addRemove,bool sendPack) 2787 public void avnHandleChangeAnim(UUID animID, bool addRemove,bool sendPack)
@@ -2879,11 +2999,12 @@ namespace OpenSim.Region.Framework.Scenes
2879 SendOtherAgentsAppearanceToMe(); 2999 SendOtherAgentsAppearanceToMe();
2880 3000
2881 EntityBase[] entities = Scene.Entities.GetEntities(); 3001 EntityBase[] entities = Scene.Entities.GetEntities();
2882 foreach(EntityBase e in entities) 3002 foreach (EntityBase e in entities)
2883 { 3003 {
2884 if (e != null && e is SceneObjectGroup) 3004 if (e != null && e is SceneObjectGroup)
2885 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient); 3005 ((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
2886 } 3006 }
3007
2887 }); 3008 });
2888 } 3009 }
2889 3010
@@ -3109,7 +3230,7 @@ namespace OpenSim.Region.Framework.Scenes
3109 cadu.Velocity = Velocity; 3230 cadu.Velocity = Velocity;
3110 3231
3111 AgentPosition agentpos = new AgentPosition(); 3232 AgentPosition agentpos = new AgentPosition();
3112 agentpos.CopyFrom(cadu); 3233 agentpos.CopyFrom(cadu, ControllingClient.SessionId);
3113 3234
3114 // Let's get this out of the update loop 3235 // Let's get this out of the update loop
3115 Util.FireAndForget(delegate { m_scene.SendOutChildAgentUpdates(agentpos, this); }); 3236 Util.FireAndForget(delegate { m_scene.SendOutChildAgentUpdates(agentpos, this); });
@@ -3347,10 +3468,12 @@ namespace OpenSim.Region.Framework.Scenes
3347 if (byebyeRegions.Count > 0) 3468 if (byebyeRegions.Count > 0)
3348 { 3469 {
3349 m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents"); 3470 m_log.Debug("[SCENE PRESENCE]: Closing " + byebyeRegions.Count + " child agents");
3350 Util.FireAndForget(delegate 3471
3351 { 3472 AgentCircuitData acd = Scene.AuthenticateHandler.GetAgentCircuitData(UUID);
3352 m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, byebyeRegions); 3473 string auth = string.Empty;
3353 }); 3474 if (acd != null)
3475 auth = acd.SessionID.ToString();
3476 m_scene.SceneGridService.SendCloseChildAgentConnections(ControllingClient.AgentId, auth, byebyeRegions);
3354 } 3477 }
3355 3478
3356 foreach (ulong handle in byebyeRegions) 3479 foreach (ulong handle in byebyeRegions)
@@ -3451,6 +3574,7 @@ namespace OpenSim.Region.Framework.Scenes
3451 3574
3452 cAgent.AgentID = UUID; 3575 cAgent.AgentID = UUID;
3453 cAgent.RegionID = Scene.RegionInfo.RegionID; 3576 cAgent.RegionID = Scene.RegionInfo.RegionID;
3577 cAgent.SessionID = ControllingClient.SessionId;
3454 3578
3455 cAgent.Position = AbsolutePosition; 3579 cAgent.Position = AbsolutePosition;
3456 cAgent.Velocity = m_velocity; 3580 cAgent.Velocity = m_velocity;
@@ -3693,7 +3817,8 @@ namespace OpenSim.Region.Framework.Scenes
3693 3817
3694// if (m_updateCount > 0) 3818// if (m_updateCount > 0)
3695// { 3819// {
3696 Animator.UpdateMovementAnimations(); 3820 if (Animator.UpdateMovementAnimations())
3821 TriggerScenePresenceUpdated();
3697// m_updateCount--; 3822// m_updateCount--;
3698// } 3823// }
3699 3824