* SendLayerData overload including coords now uses patch number rather than coords directly.
parent
402aa1b0d2
commit
b9af2fe393
|
@ -323,8 +323,8 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
int[] patches = new int[1];
|
int[] patches = new int[1];
|
||||||
int patchx, patchy;
|
int patchx, patchy;
|
||||||
patchx = px / 16;
|
patchx = px;
|
||||||
patchy = py / 16;
|
patchy = py;
|
||||||
|
|
||||||
patches[0] = patchx + 0 + patchy * 16;
|
patches[0] = patchx + 0 + patchy * 16;
|
||||||
|
|
||||||
|
|
|
@ -58,32 +58,26 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
case 0:
|
case 0:
|
||||||
// flatten terrain
|
// flatten terrain
|
||||||
Terrain.FlattenTerrain(north, west, size, (double)seconds / 5.0);
|
Terrain.FlattenTerrain(north, west, size, (double)seconds / 5.0);
|
||||||
RegenerateTerrain(true, (int)north, (int)west);
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
// raise terrain
|
// raise terrain
|
||||||
Terrain.RaiseTerrain(north, west, size, (double)seconds / 5.0);
|
Terrain.RaiseTerrain(north, west, size, (double)seconds / 5.0);
|
||||||
RegenerateTerrain(true, (int)north, (int)west);
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//lower terrain
|
//lower terrain
|
||||||
Terrain.LowerTerrain(north, west, size, (double)seconds / 5.0);
|
Terrain.LowerTerrain(north, west, size, (double)seconds / 5.0);
|
||||||
RegenerateTerrain(true, (int)north, (int)west);
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
// smooth terrain
|
// smooth terrain
|
||||||
Terrain.SmoothTerrain(north, west, size, (double)seconds / 5.0);
|
Terrain.SmoothTerrain(north, west, size, (double)seconds / 5.0);
|
||||||
RegenerateTerrain(true, (int)north, (int)west);
|
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
// noise
|
// noise
|
||||||
Terrain.NoiseTerrain(north, west, size, (double)seconds / 5.0);
|
Terrain.NoiseTerrain(north, west, size, (double)seconds / 5.0);
|
||||||
RegenerateTerrain(true, (int)north, (int)west);
|
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
// revert
|
// revert
|
||||||
Terrain.RevertTerrain(north, west, size, (double)seconds / 5.0);
|
Terrain.RevertTerrain(north, west, size, (double)seconds / 5.0);
|
||||||
RegenerateTerrain(true, (int)north, (int)west);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// CLIENT EXTENSIONS GO HERE
|
// CLIENT EXTENSIONS GO HERE
|
||||||
|
@ -97,6 +91,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
// erode-hydraulic
|
// erode-hydraulic
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RegenerateTerrain(true, (int)(north / 16.0f), (int)(west / 16.0f));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
private uint _primCount = 702000;
|
private uint _primCount = 702000;
|
||||||
private Mutex _primAllocateMutex = new Mutex(false);
|
private Mutex _primAllocateMutex = new Mutex(false);
|
||||||
private int storageCount;
|
private int storageCount;
|
||||||
|
private int terrainCheckCount;
|
||||||
private int landPrimCheckCount;
|
private int landPrimCheckCount;
|
||||||
private Mutex updateLock;
|
private Mutex updateLock;
|
||||||
|
|
||||||
|
@ -235,6 +236,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
storageCount = 0;
|
storageCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
terrainCheckCount++;
|
||||||
|
if (terrainCheckCount >= 5)
|
||||||
|
{
|
||||||
|
terrainCheckCount = 0;
|
||||||
|
|
||||||
if (Terrain.Tainted())
|
if (Terrain.Tainted())
|
||||||
{
|
{
|
||||||
lock (Terrain.heightmap)
|
lock (Terrain.heightmap)
|
||||||
|
@ -270,6 +276,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
Terrain.ResetTaint();
|
Terrain.ResetTaint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
landPrimCheckCount++;
|
landPrimCheckCount++;
|
||||||
if (landPrimCheckCount > 50) //check every 5 seconds for tainted prims
|
if (landPrimCheckCount > 50) //check every 5 seconds for tainted prims
|
||||||
|
|
Loading…
Reference in New Issue