allow landing under lower hight skyboxes

0.9.1.0-post-fixes
UbitUmarov 2019-01-03 23:11:39 +00:00
parent c032724921
commit 2ac6fb9ae9
2 changed files with 12 additions and 18 deletions

View File

@ -4667,16 +4667,6 @@ Label_GroupsDone:
return false; return false;
} }
// public bool IncomingCloseAgent(UUID agentID)
// {
// return IncomingCloseAgent(agentID, false);
// }
// public bool IncomingCloseChildAgent(UUID agentID)
// {
// return IncomingCloseAgent(agentID, true);
// }
/// <summary> /// <summary>
/// Tell a single client to prepare to close. /// Tell a single client to prepare to close.
/// </summary> /// </summary>

View File

@ -1251,8 +1251,9 @@ namespace OpenSim.Region.Framework.Scenes
/// </remarks> /// </remarks>
// constants for physics position search // constants for physics position search
const float PhysSearchHeight = 600f; const float PhysSearchHeight = 300f;
const float PhysMinSkipGap = 50f; const float PhysMinSkipGap = 20f;
const float PhysSkipGapDelta = 30f;
const int PhysNumberCollisions = 30; const int PhysNumberCollisions = 30;
// only in use as part of completemovement // only in use as part of completemovement
@ -1398,11 +1399,13 @@ namespace OpenSim.Region.Framework.Scenes
List<ContactResult> physresults = List<ContactResult> physresults =
(List<ContactResult>)m_scene.RayCastFiltered(RayStart, direction, dist, physcount, rayfilter); (List<ContactResult>)m_scene.RayCastFiltered(RayStart, direction, dist, physcount, rayfilter);
if (physresults != null && physresults.Count > 0) while (physresults != null && physresults.Count > 0)
{ {
float dest = physresults[0].Pos.Z; float dest = physresults[0].Pos.Z;
if (dest - groundHeight > PhysMinSkipGap + PhysSkipGapDelta)
break;
if(physresults.Count > 1) if (physresults.Count > 1)
{ {
physresults.Sort(delegate(ContactResult a, ContactResult b) physresults.Sort(delegate(ContactResult a, ContactResult b)
{ {
@ -1420,7 +1423,7 @@ namespace OpenSim.Region.Framework.Scenes
if(curd >= nextd) if(curd >= nextd)
{ {
sel = i; sel = i;
if(curd >= maxDepth) if(curd >= maxDepth || curd >= nextd + PhysSkipGapDelta)
break; break;
} }
nextd = curd + PhysMinSkipGap; nextd = curd + PhysMinSkipGap;
@ -1431,6 +1434,7 @@ namespace OpenSim.Region.Framework.Scenes
dest += localAVHalfHeight; dest += localAVHalfHeight;
if(dest > pos.Z) if(dest > pos.Z)
pos.Z = dest; pos.Z = dest;
break;
} }
} }