send agent view range to new child agents
parent
8e094887cd
commit
15b6d8c147
|
@ -173,6 +173,7 @@ namespace OpenSim.Framework
|
|||
/// Position the Agent's Avatar starts in the region
|
||||
/// </summary>
|
||||
public Vector3 startpos;
|
||||
public float startfar = -1.0f;
|
||||
|
||||
public Dictionary<string, object> ServiceURLs;
|
||||
|
||||
|
@ -219,6 +220,8 @@ namespace OpenSim.Framework
|
|||
args["channel"] = OSD.FromString(Channel);
|
||||
args["mac"] = OSD.FromString(Mac);
|
||||
args["id0"] = OSD.FromString(Id0);
|
||||
if(startfar > 0)
|
||||
args["far"] = OSD.FromReal(startfar);
|
||||
|
||||
if (Appearance != null)
|
||||
{
|
||||
|
@ -327,6 +330,9 @@ namespace OpenSim.Framework
|
|||
if (args["start_pos"] != null)
|
||||
Vector3.TryParse(args["start_pos"].AsString(), out startpos);
|
||||
|
||||
if(args["far"] != null)
|
||||
startfar = (float)args["far"].AsReal();
|
||||
|
||||
//m_log.InfoFormat("[AGENTCIRCUITDATA]: agentid={0}, child={1}, startpos={2}", AgentID, child, startpos);
|
||||
|
||||
try
|
||||
|
|
|
@ -79,6 +79,7 @@ namespace OpenSim.Framework
|
|||
user.LoginInfo.InventoryFolder = validcircuit.InventoryFolder;
|
||||
user.LoginInfo.BaseFolder = validcircuit.BaseFolder;
|
||||
user.LoginInfo.StartPos = validcircuit.startpos;
|
||||
user.LoginInfo.StartFar = (float)validcircuit.startfar;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -175,7 +176,8 @@ namespace OpenSim.Framework
|
|||
{
|
||||
m_agentCircuits[(uint) agentData.circuitcode].firstname = agentData.firstname;
|
||||
m_agentCircuits[(uint) agentData.circuitcode].lastname = agentData.lastname;
|
||||
m_agentCircuits[(uint) agentData.circuitcode].startpos = agentData.startpos;
|
||||
m_agentCircuits[(uint)agentData.circuitcode].startpos = agentData.startpos;
|
||||
m_agentCircuits[(uint)agentData.circuitcode].startfar = agentData.startfar;
|
||||
|
||||
// Updated for when we don't know them before calling Scene.NewUserConnection
|
||||
m_agentCircuits[(uint) agentData.circuitcode].SecureSessionID = agentData.SecureSessionID;
|
||||
|
|
|
@ -707,6 +707,7 @@ namespace OpenSim.Framework
|
|||
public interface IClientAPI
|
||||
{
|
||||
Vector3 StartPos { get; set; }
|
||||
float StartFar { get; set; }
|
||||
|
||||
UUID AgentId { get; }
|
||||
|
||||
|
|
|
@ -42,11 +42,13 @@ namespace OpenSim.Framework
|
|||
public UUID SecureSession = UUID.Zero;
|
||||
public UUID Session;
|
||||
public Vector3 StartPos;
|
||||
public float StartFar;
|
||||
public AvatarAppearance Appearance;
|
||||
|
||||
public Login()
|
||||
{
|
||||
StartPos = new Vector3(128, 128, 70);
|
||||
StartFar = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -408,6 +408,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
get { return m_startpos; }
|
||||
set { m_startpos = value; }
|
||||
}
|
||||
public float StartFar { get; set; }
|
||||
|
||||
public bool DeliverPackets
|
||||
{
|
||||
get { return m_deliverPackets; }
|
||||
|
@ -540,6 +542,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
m_firstName = sessionInfo.LoginInfo.First;
|
||||
m_lastName = sessionInfo.LoginInfo.Last;
|
||||
m_startpos = sessionInfo.LoginInfo.StartPos;
|
||||
StartFar = sessionInfo.LoginInfo.StartFar;
|
||||
|
||||
m_udpServer = udpServer;
|
||||
m_udpClient = udpClient;
|
||||
|
|
|
@ -1946,6 +1946,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
agent.BaseFolder = UUID.Zero;
|
||||
agent.InventoryFolder = UUID.Zero;
|
||||
agent.startpos = sp.AbsolutePosition + CalculateOffset(sp, region);
|
||||
agent.startfar = sp.DrawDistance;
|
||||
agent.child = true;
|
||||
agent.Appearance = new AvatarAppearance();
|
||||
agent.Appearance.AvatarHeight = sp.Appearance.AvatarHeight;
|
||||
|
@ -2105,7 +2106,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
agent.child = true;
|
||||
agent.Appearance = new AvatarAppearance();
|
||||
agent.Appearance.AvatarHeight = sp.Appearance.AvatarHeight;
|
||||
|
||||
agent.startfar = sp.DrawDistance;
|
||||
if (currentAgentCircuit != null)
|
||||
{
|
||||
agent.ServiceURLs = currentAgentCircuit.ServiceURLs;
|
||||
|
|
|
@ -1079,7 +1079,14 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
Animator = new ScenePresenceAnimator(this);
|
||||
Overrides = new MovementAnimationOverrides();
|
||||
PresenceType = type;
|
||||
DrawDistance = world.DefaultDrawDistance;
|
||||
m_drawDistance = client.StartFar;
|
||||
if(m_drawDistance > 32)
|
||||
{
|
||||
if(m_drawDistance > world.MaxDrawDistance)
|
||||
m_drawDistance = world.MaxDrawDistance;
|
||||
}
|
||||
else
|
||||
m_drawDistance = world.DefaultDrawDistance;
|
||||
RegionHandle = world.RegionInfo.RegionHandle;
|
||||
ControllingClient = client;
|
||||
Firstname = ControllingClient.FirstName;
|
||||
|
|
|
@ -524,6 +524,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
|||
set { }
|
||||
}
|
||||
|
||||
public float StartFar { get; set; }
|
||||
|
||||
public bool TryGet<T>(out T iface)
|
||||
{
|
||||
iface = default(T);
|
||||
|
|
|
@ -562,6 +562,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
set { }
|
||||
}
|
||||
|
||||
public float StartFar { get; set; }
|
||||
|
||||
public virtual UUID AgentId
|
||||
{
|
||||
get { return m_uuid; }
|
||||
|
|
|
@ -369,6 +369,8 @@ namespace OpenSim.Tests.Common
|
|||
set { }
|
||||
}
|
||||
|
||||
public float StartFar { get; set; }
|
||||
|
||||
public virtual UUID AgentId
|
||||
{
|
||||
get { return m_agentId; }
|
||||
|
|
Loading…
Reference in New Issue