* SendLayerData overload including coords now uses patch number rather than coords directly.

afrisby
Adam Frisby 2007-07-24 05:38:21 +00:00
parent 402aa1b0d2
commit b9af2fe393
3 changed files with 32 additions and 28 deletions

View File

@ -323,8 +323,8 @@ namespace OpenSim.Region.ClientStack
{
int[] patches = new int[1];
int patchx, patchy;
patchx = px / 16;
patchy = py / 16;
patchx = px;
patchy = py;
patches[0] = patchx + 0 + patchy * 16;

View File

@ -58,32 +58,26 @@ namespace OpenSim.Region.Environment.Scenes
case 0:
// flatten terrain
Terrain.FlattenTerrain(north, west, size, (double)seconds / 5.0);
RegenerateTerrain(true, (int)north, (int)west);
break;
case 1:
// raise terrain
Terrain.RaiseTerrain(north, west, size, (double)seconds / 5.0);
RegenerateTerrain(true, (int)north, (int)west);
break;
case 2:
//lower terrain
Terrain.LowerTerrain(north, west, size, (double)seconds / 5.0);
RegenerateTerrain(true, (int)north, (int)west);
break;
case 3:
// smooth terrain
Terrain.SmoothTerrain(north, west, size, (double)seconds / 5.0);
RegenerateTerrain(true, (int)north, (int)west);
break;
case 4:
// noise
Terrain.NoiseTerrain(north, west, size, (double)seconds / 5.0);
RegenerateTerrain(true, (int)north, (int)west);
break;
case 5:
// revert
Terrain.RevertTerrain(north, west, size, (double)seconds / 5.0);
RegenerateTerrain(true, (int)north, (int)west);
break;
// CLIENT EXTENSIONS GO HERE
@ -97,6 +91,9 @@ namespace OpenSim.Region.Environment.Scenes
// erode-hydraulic
break;
}
RegenerateTerrain(true, (int)(north / 16.0f), (int)(west / 16.0f));
return;
}

View File

@ -61,6 +61,7 @@ namespace OpenSim.Region.Environment.Scenes
private uint _primCount = 702000;
private Mutex _primAllocateMutex = new Mutex(false);
private int storageCount;
private int terrainCheckCount;
private int landPrimCheckCount;
private Mutex updateLock;
@ -235,6 +236,11 @@ namespace OpenSim.Region.Environment.Scenes
storageCount = 0;
}
terrainCheckCount++;
if (terrainCheckCount >= 5)
{
terrainCheckCount = 0;
if (Terrain.Tainted())
{
lock (Terrain.heightmap)
@ -270,6 +276,7 @@ namespace OpenSim.Region.Environment.Scenes
Terrain.ResetTaint();
}
}
}
landPrimCheckCount++;
if (landPrimCheckCount > 50) //check every 5 seconds for tainted prims