fixed order of map block requests to grid server. flipped map texture, as it was upside down.
parent
545404e3ec
commit
6ed34cc27e
|
@ -223,6 +223,21 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
|
public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
|
||||||
{
|
{
|
||||||
|
int temp = 0;
|
||||||
|
|
||||||
|
if (minX > maxX)
|
||||||
|
{
|
||||||
|
temp = minX;
|
||||||
|
minX = maxX;
|
||||||
|
maxX = temp;
|
||||||
|
}
|
||||||
|
if (minY > maxY)
|
||||||
|
{
|
||||||
|
temp = minY;
|
||||||
|
minY = maxY;
|
||||||
|
maxY = temp;
|
||||||
|
}
|
||||||
|
|
||||||
Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY);
|
Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY);
|
||||||
|
|
||||||
List<MapBlockData> neighbours = new List<MapBlockData>();
|
List<MapBlockData> neighbours = new List<MapBlockData>();
|
||||||
|
|
|
@ -1261,13 +1261,13 @@ namespace OpenSim.Region.Terrain
|
||||||
}
|
}
|
||||||
|
|
||||||
Channel copy = heightmap.Copy();
|
Channel copy = heightmap.Copy();
|
||||||
for (int y = 0; y < copy.h; y++)
|
for (int y = 0; y <copy.h; y++)
|
||||||
{
|
{
|
||||||
for (int x = 0; x < copy.w; x++)
|
for (int x = 0; x < copy.w; x++)
|
||||||
{
|
{
|
||||||
// 512 is the largest possible height before colours clamp
|
// 512 is the largest possible height before colours clamp
|
||||||
int colorindex = (int) (Math.Max(Math.Min(1.0, copy.Get(x, y)/512.0), 0.0)*(pallete - 1));
|
int colorindex = (int) (Math.Max(Math.Min(1.0, copy.Get(x, y)/512.0), 0.0)*(pallete - 1));
|
||||||
bmp.SetPixel(x, y, colours[colorindex]);
|
bmp.SetPixel(x, copy.h-y-1, colours[colorindex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bmp;
|
return bmp;
|
||||||
|
|
Loading…
Reference in New Issue