* Standalone logins will now go through the sequence of "requested region, default region, any region" before giving up
* Hip offset should have been added not subtracted (it's a negative offset). This puts avatar feet closer to the ground * Improved duplicate checking for terse updates. This should reduce bandwidth and walking through walls0.6.8-post-fixes
parent
c003f49432
commit
b81c829576
|
@ -231,6 +231,10 @@ namespace OpenSim.Client.Linden
|
|||
{
|
||||
return scene.RegionInfo;
|
||||
}
|
||||
else if (m_scenes.Count > 0)
|
||||
{
|
||||
return m_scenes[0].RegionInfo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -1031,30 +1031,26 @@ namespace OpenSim.Framework.Communications.Services
|
|||
return true;
|
||||
}
|
||||
|
||||
// StartLocation not available, send him to a nearby region instead
|
||||
// regionInfo = m_gridService.RequestClosestRegion("");
|
||||
//m_log.InfoFormat("[LOGIN]: StartLocation not available sending to region {0}", regionInfo.regionName);
|
||||
// Get the default region handle
|
||||
ulong defaultHandle = Utils.UIntsToLong(m_defaultHomeX * Constants.RegionSize, m_defaultHomeY * Constants.RegionSize);
|
||||
|
||||
// Send him to default region instead
|
||||
ulong defaultHandle = (((ulong)m_defaultHomeX * Constants.RegionSize) << 32) |
|
||||
((ulong)m_defaultHomeY * Constants.RegionSize);
|
||||
|
||||
if ((regionInfo != null) && (defaultHandle == regionInfo.RegionHandle))
|
||||
{
|
||||
m_log.ErrorFormat("[LOGIN]: Not trying the default region since this is the same as the selected region");
|
||||
return false;
|
||||
}
|
||||
|
||||
m_log.Error("[LOGIN]: Sending user to default region " + defaultHandle + " instead");
|
||||
regionInfo = GetRegionInfo(defaultHandle);
|
||||
// If we haven't already tried the default region, reset regionInfo
|
||||
if (regionInfo != null && defaultHandle != regionInfo.RegionHandle)
|
||||
regionInfo = null;
|
||||
|
||||
if (regionInfo == null)
|
||||
{
|
||||
m_log.ErrorFormat("[LOGIN]: No default region available. Aborting.");
|
||||
return false;
|
||||
m_log.Error("[LOGIN]: Sending user to default region " + defaultHandle + " instead");
|
||||
regionInfo = GetRegionInfo(defaultHandle);
|
||||
}
|
||||
|
||||
theUser.CurrentAgent.Position = new Vector3(128, 128, 0);
|
||||
if (regionInfo == null)
|
||||
{
|
||||
m_log.ErrorFormat("[LOGIN]: Sending user to any region");
|
||||
regionInfo = RequestClosestRegion(String.Empty);
|
||||
}
|
||||
|
||||
theUser.CurrentAgent.Position = new Vector3(128f, 128f, 0f);
|
||||
response.StartLocation = "safe";
|
||||
|
||||
return PrepareLoginToRegion(regionInfo, theUser, response, client);
|
||||
|
|
|
@ -193,6 +193,10 @@ namespace OpenSim.Region.CoreModules.Hypergrid
|
|||
{
|
||||
return scene.RegionInfo;
|
||||
}
|
||||
else if (m_scenes.Count > 0)
|
||||
{
|
||||
return m_scenes[0].RegionInfo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -248,7 +252,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
|
|||
{
|
||||
foreach (Scene nextScene in m_scenes)
|
||||
{
|
||||
if (nextScene.RegionInfo.RegionName == regionName)
|
||||
if (nextScene.RegionInfo.RegionName.Equals(regionName, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
scene = nextScene;
|
||||
return true;
|
||||
|
|
|
@ -2394,18 +2394,19 @@ if (m_shape != null) {
|
|||
/// </summary>
|
||||
public void SendScheduledUpdates()
|
||||
{
|
||||
const float VELOCITY_TOLERANCE = 0.0001f;
|
||||
const float POSITION_TOLERANCE = 0.1f;
|
||||
const float ROTATION_TOLERANCE = 0.01f;
|
||||
const float VELOCITY_TOLERANCE = 0.001f;
|
||||
const float POSITION_TOLERANCE = 0.05f;
|
||||
const int TIME_MS_TOLERANCE = 3000;
|
||||
|
||||
if (m_updateFlag == 1)
|
||||
{
|
||||
// Throw away duplicate or insignificant updates
|
||||
if (RotationOffset != m_lastRotation ||
|
||||
Acceleration != m_lastAcceleration ||
|
||||
(Velocity - m_lastVelocity).Length() > VELOCITY_TOLERANCE ||
|
||||
(RotationalVelocity - m_lastAngularVelocity).Length() > VELOCITY_TOLERANCE ||
|
||||
(OffsetPosition - m_lastPosition).Length() > POSITION_TOLERANCE ||
|
||||
if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
|
||||
!Acceleration.Equals(m_lastAcceleration) ||
|
||||
!Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
|
||||
!RotationalVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
|
||||
!OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
||||
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
||||
{
|
||||
AddTerseUpdateToAllAvatars();
|
||||
|
|
|
@ -2362,8 +2362,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
public override void Update()
|
||||
{
|
||||
const float VELOCITY_TOLERANCE = 0.0001f;
|
||||
const float POSITION_TOLERANCE = 10.0f;
|
||||
const float ROTATION_TOLERANCE = 0.01f;
|
||||
const float VELOCITY_TOLERANCE = 0.001f;
|
||||
const float POSITION_TOLERANCE = 0.05f;
|
||||
const int TIME_MS_TOLERANCE = 3000;
|
||||
|
||||
SendPrimUpdates();
|
||||
|
@ -2377,9 +2378,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (m_isChildAgent == false)
|
||||
{
|
||||
// Throw away duplicate or insignificant updates
|
||||
if (m_bodyRot != m_lastRotation ||
|
||||
(m_velocity - m_lastVelocity).Length() > VELOCITY_TOLERANCE ||
|
||||
(m_pos - m_lastPosition).Length() > POSITION_TOLERANCE ||
|
||||
if (!m_bodyRot.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
|
||||
!m_velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
|
||||
!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
|
||||
Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
||||
{
|
||||
SendTerseUpdateToAllClients();
|
||||
|
@ -2415,7 +2416,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_perfMonMS = Environment.TickCount;
|
||||
|
||||
Vector3 pos = m_pos;
|
||||
pos.Z -= m_appearance.HipOffset;
|
||||
pos.Z += m_appearance.HipOffset;
|
||||
|
||||
//m_log.DebugFormat("[SCENEPRESENCE]: TerseUpdate: Pos={0} Rot={1} Vel={2}", m_pos, m_bodyRot, m_velocity);
|
||||
|
||||
remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
|
||||
pos, m_velocity, Vector3.Zero, m_bodyRot, Vector4.UnitW, m_uuid, null, GetUpdatePriority(remoteClient)));
|
||||
|
@ -2514,7 +2517,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return;
|
||||
|
||||
Vector3 pos = m_pos;
|
||||
pos.Z -= m_appearance.HipOffset;
|
||||
pos.Z += m_appearance.HipOffset;
|
||||
|
||||
remoteAvatar.m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid,
|
||||
LocalId, pos, m_appearance.Texture.GetBytes(),
|
||||
|
@ -2585,7 +2588,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
|
||||
|
||||
Vector3 pos = m_pos;
|
||||
pos.Z -= m_appearance.HipOffset;
|
||||
pos.Z += m_appearance.HipOffset;
|
||||
|
||||
m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
|
||||
pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot));
|
||||
|
@ -2694,7 +2697,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
Vector3 pos = m_pos;
|
||||
pos.Z -= m_appearance.HipOffset;
|
||||
pos.Z += m_appearance.HipOffset;
|
||||
|
||||
m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
|
||||
pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot));
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue