change collor
parent
728a07475e
commit
f111094d30
|
@ -138,6 +138,21 @@ namespace OpenSim.Modules.PathFinding
|
||||||
{
|
{
|
||||||
Bitmap _map = new Bitmap((int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY);
|
Bitmap _map = new Bitmap((int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY);
|
||||||
|
|
||||||
|
for (int X = 0; X < m_scene.RegionInfo.RegionSizeX; X++)
|
||||||
|
{
|
||||||
|
for (int Y = 0; Y < m_scene.RegionInfo.RegionSizeY; Y++)
|
||||||
|
{
|
||||||
|
float baseheight = (float)m_scene.Heightmap[X, Y];
|
||||||
|
|
||||||
|
if (baseheight <= m_scene.RegionInfo.RegionSettings.WaterHeight)
|
||||||
|
_map.SetPixel(Y, X, Color.Blue);
|
||||||
|
|
||||||
|
if (baseheight > m_scene.RegionInfo.RegionSettings.WaterHeight)
|
||||||
|
_map.SetPixel(Y, X, Color.Green);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PathFindingSceneGenerator.DrawObjectVolume(m_scene, ref _map);
|
PathFindingSceneGenerator.DrawObjectVolume(m_scene, ref _map);
|
||||||
|
|
||||||
_map.Save(imageName + ".png", ImageFormat.Png);
|
_map.Save(imageName + ".png", ImageFormat.Png);
|
||||||
|
@ -159,6 +174,8 @@ namespace OpenSim.Modules.PathFinding
|
||||||
|
|
||||||
if (_host != null)
|
if (_host != null)
|
||||||
{
|
{
|
||||||
|
UUID tid = m_asyncCommands.DataserverPlugin.RegisterRequest(_host.LocalId, _host.GroupID, imageName);
|
||||||
|
|
||||||
(new Thread(delegate () { createPathFindingScene(imageName); })).Start();
|
(new Thread(delegate () { createPathFindingScene(imageName); })).Start();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -33,13 +33,20 @@ namespace OpenSim.Modules.PathFinding
|
||||||
if (obj is SceneObjectGroup)
|
if (obj is SceneObjectGroup)
|
||||||
{
|
{
|
||||||
SceneObjectGroup mapdot = (SceneObjectGroup)obj;
|
SceneObjectGroup mapdot = (SceneObjectGroup)obj;
|
||||||
Color mapdotspot = Color.Gray; // Default color when prim color is white
|
|
||||||
|
if (mapdot.IsPhantom == true)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Color mapdotspot = Color.Red; // Default color when prim color is white
|
||||||
// Loop over prim in group
|
// Loop over prim in group
|
||||||
foreach (SceneObjectPart part in mapdot.Parts)
|
foreach (SceneObjectPart part in mapdot.Parts)
|
||||||
{
|
{
|
||||||
if (part == null)
|
if (part == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (part.Description.Contains("allowedpath"))
|
||||||
|
mapdotspot = Color.Green;
|
||||||
|
|
||||||
// Draw if the object is at least 1 meter wide in any direction
|
// Draw if the object is at least 1 meter wide in any direction
|
||||||
if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f)
|
if (part.Scale.X > 1f || part.Scale.Y > 1f || part.Scale.Z > 1f)
|
||||||
{
|
{
|
||||||
|
@ -79,7 +86,7 @@ namespace OpenSim.Modules.PathFinding
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// If the color gets goofy somehow, skip it *shakes fist at Color4
|
// If the color gets goofy somehow, skip it *shakes fist at Color4
|
||||||
mapdotspot = Color.FromArgb(colorr, colorg, colorb);
|
//mapdotspot = Color.FromArgb(colorr, colorg, colorb);
|
||||||
}
|
}
|
||||||
catch (ArgumentException)
|
catch (ArgumentException)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue