let RePrioritization also work on child agents
parent
06b412c980
commit
d7ab1cdd15
|
@ -2132,10 +2132,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SendInitialDataToMe();
|
SendInitialDataToMe();
|
||||||
|
|
||||||
// priority uses avatar position only
|
// priority uses avatar position only
|
||||||
m_reprioritizationLastPosition = AbsolutePosition;
|
// m_reprioritizationLastPosition = AbsolutePosition;
|
||||||
m_reprioritizationLastDrawDistance = DrawDistance;
|
// m_reprioritizationLastDrawDistance = DrawDistance;
|
||||||
m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it
|
// m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it
|
||||||
m_reprioritizationBusy = false;
|
// m_reprioritizationBusy = false;
|
||||||
|
|
||||||
m_log.DebugFormat("[CompleteMovement] SendInitialDataToMe: {0}ms", Util.EnvironmentTickCountSubtract(ts));
|
m_log.DebugFormat("[CompleteMovement] SendInitialDataToMe: {0}ms", Util.EnvironmentTickCountSubtract(ts));
|
||||||
|
|
||||||
|
@ -3781,6 +3781,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment)
|
if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment)
|
||||||
((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
|
((SceneObjectGroup)e).SendFullUpdateToClient(ControllingClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_reprioritizationLastPosition = AbsolutePosition;
|
||||||
|
m_reprioritizationLastDrawDistance = DrawDistance;
|
||||||
|
m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it
|
||||||
|
m_reprioritizationBusy = false;
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3997,11 +4003,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
float minregionSize = (float)Scene.RegionInfo.RegionSizeX;
|
float minregionSize = (float)Scene.RegionInfo.RegionSizeX;
|
||||||
if(minregionSize > (float)Scene.RegionInfo.RegionSizeY)
|
if(minregionSize > (float)Scene.RegionInfo.RegionSizeY)
|
||||||
minregionSize = (float)Scene.RegionInfo.RegionSizeY;
|
minregionSize = (float)Scene.RegionInfo.RegionSizeY;
|
||||||
|
minregionSize *= 0.5f;
|
||||||
if(DrawDistance > minregionSize && m_reprioritizationLastDrawDistance > minregionSize)
|
if(DrawDistance > minregionSize && m_reprioritizationLastDrawDistance > minregionSize)
|
||||||
byDrawdistance = false;
|
byDrawdistance = false;
|
||||||
else
|
else
|
||||||
byDrawdistance = (Math.Abs(DrawDistance-m_reprioritizationLastDrawDistance) > 0.5f * limit);
|
byDrawdistance = (Math.Abs(DrawDistance-m_reprioritizationLastDrawDistance) > 0.5f * limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
int tdiff = Util.EnvironmentTickCountSubtract(m_reprioritizationLastTime);
|
int tdiff = Util.EnvironmentTickCountSubtract(m_reprioritizationLastTime);
|
||||||
if(!byDrawdistance && tdiff < Scene.ReprioritizationInterval)
|
if(!byDrawdistance && tdiff < Scene.ReprioritizationInterval)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue