diff options
Final part for implementing SendChildAgentDataUpdate with modules. This is the part that uses the modules in Scene and related classes. This commit breaks compatibility of sim-sim SendChildAgentUpdates with older versions of OpenSim.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 8f6872e..41971fc 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -2326,7 +2326,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
2326 | //m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString()); | 2326 | //m_log.Info("[NeighborThrottle]: " + m_scene.GetInaccurateNeighborCount().ToString() + " - m: " + multiplier.ToString()); |
2327 | cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier); | 2327 | cadu.throttles = ControllingClient.GetThrottlesPacked(multiplier); |
2328 | cadu.Velocity = new sLLVector3(Velocity); | 2328 | cadu.Velocity = new sLLVector3(Velocity); |
2329 | m_scene.SendOutChildAgentUpdates(cadu,this); | 2329 | |
2330 | AgentData agent = new AgentData(); | ||
2331 | agent.CopyFrom(cadu); | ||
2332 | |||
2333 | m_scene.SendOutChildAgentUpdates(agent, this); | ||
2330 | 2334 | ||
2331 | m_LastChildAgentUpdatePosition.X = AbsolutePosition.X; | 2335 | m_LastChildAgentUpdatePosition.X = AbsolutePosition.X; |
2332 | m_LastChildAgentUpdatePosition.Y = AbsolutePosition.Y; | 2336 | m_LastChildAgentUpdatePosition.Y = AbsolutePosition.Y; |
@@ -2571,7 +2575,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2571 | /// This updates important decision making data about a child agent | 2575 | /// This updates important decision making data about a child agent |
2572 | /// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region | 2576 | /// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region |
2573 | /// </summary> | 2577 | /// </summary> |
2574 | public void ChildAgentDataUpdate(ChildAgentDataUpdate cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY) | 2578 | public void ChildAgentDataUpdate(AgentData cAgentData, uint tRegionX, uint tRegionY, uint rRegionX, uint rRegionY) |
2575 | { | 2579 | { |
2576 | // | 2580 | // |
2577 | if (!IsChildAgent) | 2581 | if (!IsChildAgent) |
@@ -2580,19 +2584,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
2580 | int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize; | 2584 | int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize; |
2581 | int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize; | 2585 | int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize; |
2582 | 2586 | ||
2583 | m_DrawDistance = cAgentData.drawdistance; | 2587 | m_DrawDistance = cAgentData.Far; |
2584 | m_pos = new Vector3(cAgentData.Position.x + shiftx, cAgentData.Position.y + shifty, cAgentData.Position.z); | 2588 | m_pos = new Vector3(cAgentData.Position.X + shiftx, cAgentData.Position.Y + shifty, cAgentData.Position.Z); |
2585 | 2589 | ||
2586 | // It's hard to say here.. We can't really tell where the camera position is unless it's in world cordinates from the sending region | 2590 | // It's hard to say here.. We can't really tell where the camera position is unless it's in world cordinates from the sending region |
2587 | m_CameraCenter = | 2591 | m_CameraCenter = cAgentData.Center; |
2588 | new Vector3(cAgentData.cameraPosition.x, cAgentData.cameraPosition.y, cAgentData.cameraPosition.z); | 2592 | // new Vector3(cAgentData.cameraPosition.x, cAgentData.cameraPosition.y, cAgentData.cameraPosition.z); |
2589 | 2593 | ||
2590 | 2594 | ||
2591 | m_godlevel = cAgentData.godlevel; | 2595 | m_godlevel = cAgentData.GodLevel; |
2592 | m_avHeight = cAgentData.AVHeight; | 2596 | m_avHeight = cAgentData.Size.Z; |
2593 | //SetHeight(cAgentData.AVHeight); | 2597 | //SetHeight(cAgentData.AVHeight); |
2594 | 2598 | ||
2595 | ControllingClient.SetChildAgentThrottle(cAgentData.throttles); | 2599 | ControllingClient.SetChildAgentThrottle(cAgentData.Throttles); |
2596 | 2600 | ||
2597 | // Sends out the objects in the user's draw distance if m_sendTasksToChild is true. | 2601 | // Sends out the objects in the user's draw distance if m_sendTasksToChild is true. |
2598 | if (m_scene.m_seeIntoRegionFromNeighbor) | 2602 | if (m_scene.m_seeIntoRegionFromNeighbor) |