diff options
author | UbitUmarov | 2019-04-04 00:50:54 +0100 |
---|---|---|
committer | UbitUmarov | 2019-04-04 00:50:54 +0100 |
commit | 15b6d8c1477e6a294819bf5c0c510d909997fb8f (patch) | |
tree | 9e5b005f60b628d04878a40ca0b1e0778fc87bfa | |
parent | change avatars sending point (diff) | |
download | opensim-SC-15b6d8c1477e6a294819bf5c0c510d909997fb8f.zip opensim-SC-15b6d8c1477e6a294819bf5c0c510d909997fb8f.tar.gz opensim-SC-15b6d8c1477e6a294819bf5c0c510d909997fb8f.tar.bz2 opensim-SC-15b6d8c1477e6a294819bf5c0c510d909997fb8f.tar.xz |
send agent view range to new child agents
Diffstat (limited to '')
10 files changed, 31 insertions, 3 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 5a9eeb5..330a41e 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs | |||
@@ -173,6 +173,7 @@ namespace OpenSim.Framework | |||
173 | /// Position the Agent's Avatar starts in the region | 173 | /// Position the Agent's Avatar starts in the region |
174 | /// </summary> | 174 | /// </summary> |
175 | public Vector3 startpos; | 175 | public Vector3 startpos; |
176 | public float startfar = -1.0f; | ||
176 | 177 | ||
177 | public Dictionary<string, object> ServiceURLs; | 178 | public Dictionary<string, object> ServiceURLs; |
178 | 179 | ||
@@ -219,6 +220,8 @@ namespace OpenSim.Framework | |||
219 | args["channel"] = OSD.FromString(Channel); | 220 | args["channel"] = OSD.FromString(Channel); |
220 | args["mac"] = OSD.FromString(Mac); | 221 | args["mac"] = OSD.FromString(Mac); |
221 | args["id0"] = OSD.FromString(Id0); | 222 | args["id0"] = OSD.FromString(Id0); |
223 | if(startfar > 0) | ||
224 | args["far"] = OSD.FromReal(startfar); | ||
222 | 225 | ||
223 | if (Appearance != null) | 226 | if (Appearance != null) |
224 | { | 227 | { |
@@ -327,6 +330,9 @@ namespace OpenSim.Framework | |||
327 | if (args["start_pos"] != null) | 330 | if (args["start_pos"] != null) |
328 | Vector3.TryParse(args["start_pos"].AsString(), out startpos); | 331 | Vector3.TryParse(args["start_pos"].AsString(), out startpos); |
329 | 332 | ||
333 | if(args["far"] != null) | ||
334 | startfar = (float)args["far"].AsReal(); | ||
335 | |||
330 | //m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos); | 336 | //m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos); |
331 | 337 | ||
332 | try | 338 | try |
diff --git a/OpenSim/Framework/AgentCircuitManager.cs b/OpenSim/Framework/AgentCircuitManager.cs index b6e48b4..2cd11ff 100644 --- a/OpenSim/Framework/AgentCircuitManager.cs +++ b/OpenSim/Framework/AgentCircuitManager.cs | |||
@@ -79,6 +79,7 @@ namespace OpenSim.Framework | |||
79 | user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder; | 79 | user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder; |
80 | user.LoginInfo.BaseFolder = validcircuit.BaseFolder; | 80 | user.LoginInfo.BaseFolder = validcircuit.BaseFolder; |
81 | user.LoginInfo.StartPos = validcircuit.startpos; | 81 | user.LoginInfo.StartPos = validcircuit.startpos; |
82 | user.LoginInfo.StartFar = (float)validcircuit.startfar; | ||
82 | } | 83 | } |
83 | else | 84 | else |
84 | { | 85 | { |
@@ -175,7 +176,8 @@ namespace OpenSim.Framework | |||
175 | { | 176 | { |
176 | m_agentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname; | 177 | m_agentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname; |
177 | m_agentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname; | 178 | m_agentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname; |
178 | m_agentCircuits[(uint) agentData.circuitcode].startpos = agentData.startpos; | 179 | m_agentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos; |
180 | m_agentCircuits[(uint)agentData.circuitcode].startfar = agentData.startfar; | ||
179 | 181 | ||
180 | // Updated for when we don't know them before calling Scene.NewUserConnection | 182 | // Updated for when we don't know them before calling Scene.NewUserConnection |
181 | m_agentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID; | 183 | m_agentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID; |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 8b1a982..b395f39 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -707,6 +707,7 @@ namespace OpenSim.Framework | |||
707 | public interface IClientAPI | 707 | public interface IClientAPI |
708 | { | 708 | { |
709 | Vector3 StartPos { get; set; } | 709 | Vector3 StartPos { get; set; } |
710 | float StartFar { get; set; } | ||
710 | 711 | ||
711 | UUID AgentId { get; } | 712 | UUID AgentId { get; } |
712 | 713 | ||
diff --git a/OpenSim/Framework/Login.cs b/OpenSim/Framework/Login.cs index 54a6654..b8a24ea 100644 --- a/OpenSim/Framework/Login.cs +++ b/OpenSim/Framework/Login.cs | |||
@@ -42,11 +42,13 @@ namespace OpenSim.Framework | |||
42 | public UUID SecureSession = UUID.Zero; | 42 | public UUID SecureSession = UUID.Zero; |
43 | public UUID Session; | 43 | public UUID Session; |
44 | public Vector3 StartPos; | 44 | public Vector3 StartPos; |
45 | public float StartFar; | ||
45 | public AvatarAppearance Appearance; | 46 | public AvatarAppearance Appearance; |
46 | 47 | ||
47 | public Login() | 48 | public Login() |
48 | { | 49 | { |
49 | StartPos = new Vector3(128, 128, 70); | 50 | StartPos = new Vector3(128, 128, 70); |
51 | StartFar = -1; | ||
50 | } | 52 | } |
51 | } | 53 | } |
52 | } | 54 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6859b83..5ffea62 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -408,6 +408,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
408 | get { return m_startpos; } | 408 | get { return m_startpos; } |
409 | set { m_startpos = value; } | 409 | set { m_startpos = value; } |
410 | } | 410 | } |
411 | public float StartFar { get; set; } | ||
412 | |||
411 | public bool DeliverPackets | 413 | public bool DeliverPackets |
412 | { | 414 | { |
413 | get { return m_deliverPackets; } | 415 | get { return m_deliverPackets; } |
@@ -540,6 +542,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
540 | m_firstName = sessionInfo.LoginInfo.First; | 542 | m_firstName = sessionInfo.LoginInfo.First; |
541 | m_lastName = sessionInfo.LoginInfo.Last; | 543 | m_lastName = sessionInfo.LoginInfo.Last; |
542 | m_startpos = sessionInfo.LoginInfo.StartPos; | 544 | m_startpos = sessionInfo.LoginInfo.StartPos; |
545 | StartFar = sessionInfo.LoginInfo.StartFar; | ||
543 | 546 | ||
544 | m_udpServer = udpServer; | 547 | m_udpServer = udpServer; |
545 | m_udpClient = udpClient; | 548 | m_udpClient = udpClient; |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index fb2fd07..6b3e8c4 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1946,6 +1946,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1946 | agent.BaseFolder = UUID.Zero; | 1946 | agent.BaseFolder = UUID.Zero; |
1947 | agent.InventoryFolder = UUID.Zero; | 1947 | agent.InventoryFolder = UUID.Zero; |
1948 | agent.startpos = sp.AbsolutePosition + CalculateOffset(sp, region); | 1948 | agent.startpos = sp.AbsolutePosition + CalculateOffset(sp, region); |
1949 | agent.startfar = sp.DrawDistance; | ||
1949 | agent.child = true; | 1950 | agent.child = true; |
1950 | agent.Appearance = new AvatarAppearance(); | 1951 | agent.Appearance = new AvatarAppearance(); |
1951 | agent.Appearance.AvatarHeight = sp.Appearance.AvatarHeight; | 1952 | agent.Appearance.AvatarHeight = sp.Appearance.AvatarHeight; |
@@ -2105,7 +2106,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2105 | agent.child = true; | 2106 | agent.child = true; |
2106 | agent.Appearance = new AvatarAppearance(); | 2107 | agent.Appearance = new AvatarAppearance(); |
2107 | agent.Appearance.AvatarHeight = sp.Appearance.AvatarHeight; | 2108 | agent.Appearance.AvatarHeight = sp.Appearance.AvatarHeight; |
2108 | 2109 | agent.startfar = sp.DrawDistance; | |
2109 | if (currentAgentCircuit != null) | 2110 | if (currentAgentCircuit != null) |
2110 | { | 2111 | { |
2111 | agent.ServiceURLs = currentAgentCircuit.ServiceURLs; | 2112 | agent.ServiceURLs = currentAgentCircuit.ServiceURLs; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2c20da6..be593ad 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1079,7 +1079,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1079 | Animator = new ScenePresenceAnimator(this); | 1079 | Animator = new ScenePresenceAnimator(this); |
1080 | Overrides = new MovementAnimationOverrides(); | 1080 | Overrides = new MovementAnimationOverrides(); |
1081 | PresenceType = type; | 1081 | PresenceType = type; |
1082 | DrawDistance = world.DefaultDrawDistance; | 1082 | m_drawDistance = client.StartFar; |
1083 | if(m_drawDistance > 32) | ||
1084 | { | ||
1085 | if(m_drawDistance > world.MaxDrawDistance) | ||
1086 | m_drawDistance = world.MaxDrawDistance; | ||
1087 | } | ||
1088 | else | ||
1089 | m_drawDistance = world.DefaultDrawDistance; | ||
1083 | RegionHandle = world.RegionInfo.RegionHandle; | 1090 | RegionHandle = world.RegionInfo.RegionHandle; |
1084 | ControllingClient = client; | 1091 | ControllingClient = client; |
1085 | Firstname = ControllingClient.FirstName; | 1092 | Firstname = ControllingClient.FirstName; |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 9f85185..16be1c8 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -524,6 +524,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
524 | set { } | 524 | set { } |
525 | } | 525 | } |
526 | 526 | ||
527 | public float StartFar { get; set; } | ||
528 | |||
527 | public bool TryGet<T>(out T iface) | 529 | public bool TryGet<T>(out T iface) |
528 | { | 530 | { |
529 | iface = default(T); | 531 | iface = default(T); |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 954d336..b2a9716 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -562,6 +562,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
562 | set { } | 562 | set { } |
563 | } | 563 | } |
564 | 564 | ||
565 | public float StartFar { get; set; } | ||
566 | |||
565 | public virtual UUID AgentId | 567 | public virtual UUID AgentId |
566 | { | 568 | { |
567 | get { return m_uuid; } | 569 | get { return m_uuid; } |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 0031127..3cd5253 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -369,6 +369,8 @@ namespace OpenSim.Tests.Common | |||
369 | set { } | 369 | set { } |
370 | } | 370 | } |
371 | 371 | ||
372 | public float StartFar { get; set; } | ||
373 | |||
372 | public virtual UUID AgentId | 374 | public virtual UUID AgentId |
373 | { | 375 | { |
374 | get { return m_agentId; } | 376 | get { return m_agentId; } |