fixed order of map block requests to grid server. flipped map texture, as it was upside down.

afrisby
Brian McBee 2007-11-25 03:14:43 +00:00
parent 545404e3ec
commit 6ed34cc27e
2 changed files with 17 additions and 2 deletions

View File

@ -223,6 +223,21 @@ namespace OpenSim.Region.Communications.OGS1
/// <returns></returns>
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);
List<MapBlockData> neighbours = new List<MapBlockData>();

View File

@ -1261,13 +1261,13 @@ namespace OpenSim.Region.Terrain
}
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++)
{
// 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));
bmp.SetPixel(x, y, colours[colorindex]);
bmp.SetPixel(x, copy.h-y-1, colours[colorindex]);
}
}
return bmp;