some fixes/changes on land send

avinationmerge
UbitUmarov 2015-09-30 06:09:01 +01:00
parent 0151c773e2
commit d281ec5342
1 changed files with 14 additions and 7 deletions

View File

@ -1028,6 +1028,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{ {
foreach (PatchUpdates pups in m_perClientPatchUpdates.Values) foreach (PatchUpdates pups in m_perClientPatchUpdates.Values)
{ {
if(pups.Presence.IsDeleted)
continue;
// throught acording to land queue free to send bytes // throught acording to land queue free to send bytes
if (!pups.Presence.ControllingClient.CanSendLayerData()) if (!pups.Presence.ControllingClient.CanSendLayerData())
continue; continue;
@ -1104,8 +1107,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
patchs.Add(new PatchesToSend(x, y, 0)); patchs.Add(new PatchesToSend(x, y, 0));
if (++npatchs >= 128) if (++npatchs >= 128)
{ {
pups.sendAllcurrentX = x + 1; x++;
pups.sendAllcurrentY = y;
break; break;
} }
} }
@ -1121,6 +1123,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain
pups.sendAllcurrentX = 0; pups.sendAllcurrentX = 0;
pups.sendAllcurrentY = 0; pups.sendAllcurrentY = 0;
} }
else
{
pups.sendAllcurrentX = x;
pups.sendAllcurrentY = y;
}
npatchs = patchs.Count; npatchs = patchs.Count;
if (npatchs > 0) if (npatchs > 0)
@ -1181,14 +1188,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain
int startX = testposX - DrawDistance; int startX = testposX - DrawDistance;
if (startX < 0) if (startX < 0)
startX = 0; startX = 0;
else if (startX > limitX) else if (startX >= limitX)
startX = limitX; startX = limitX - 1;
int startY = testposY - DrawDistance; int startY = testposY - DrawDistance;
if (startY < 0) if (startY < 0)
startY = 0; startY = 0;
else if (startY > limitY) else if (startY >= limitY)
startY = limitY; startY = limitY - 1;
int endX = testposX + DrawDistance; int endX = testposX + DrawDistance;
if (endX < 0) if (endX < 0)
@ -1221,7 +1228,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{ {
pups.SetByPatch(x, y, false); pups.SetByPatch(x, y, false);
ret.Add(new PatchesToSend(x, y, (float)distsq)); ret.Add(new PatchesToSend(x, y, (float)distsq));
if (npatchs++ > 512) if (npatchs++ > 1024)
{ {
y = endY; y = endY;
x = endX; x = endX;