only then smaler then region
parent
a1ca6409dd
commit
380d71511c
|
@ -125,10 +125,20 @@ namespace OpenSim.Modules.PathFinding
|
||||||
|
|
||||||
private bool checkIsPositionBlockedByObjekts(int posX, int posY)
|
private bool checkIsPositionBlockedByObjekts(int posX, int posY)
|
||||||
{
|
{
|
||||||
List<SceneObjectGroup> _objects = m_scene.GetSceneObjectGroups().FindAll(X => X.IsPhantom != true && (int)X.AbsolutePosition.X == posX && (int)X.AbsolutePosition.Y == posY);
|
List<SceneObjectGroup> _objects = m_scene.GetSceneObjectGroups().FindAll(X => X.IsPhantom != true);
|
||||||
|
|
||||||
if (_objects.Count != 0)
|
foreach(SceneObjectGroup _object in _objects)
|
||||||
return true;
|
{
|
||||||
|
SceneObjectPart[] _parts = _object.Parts;
|
||||||
|
|
||||||
|
foreach (SceneObjectPart _part in _parts)
|
||||||
|
{
|
||||||
|
if ((int)_part.AbsolutePosition.X == posX && (int)_part.AbsolutePosition.Y == posY)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -137,10 +147,10 @@ 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 X = 0; X < m_scene.RegionInfo.RegionSizeX; X++)
|
||||||
{
|
{
|
||||||
m_log.Info("X: " + X);
|
m_log.Info("X: " + X);
|
||||||
for (int Y = 0; Y <= m_scene.RegionInfo.RegionSizeY; Y++)
|
for (int Y = 0; Y < m_scene.RegionInfo.RegionSizeY; Y++)
|
||||||
{
|
{
|
||||||
m_log.Info("Y: " + Y);
|
m_log.Info("Y: " + Y);
|
||||||
|
|
||||||
|
@ -151,8 +161,8 @@ namespace OpenSim.Modules.PathFinding
|
||||||
if (baseheight <= m_scene.RegionInfo.RegionSettings.WaterHeight)
|
if (baseheight <= m_scene.RegionInfo.RegionSettings.WaterHeight)
|
||||||
_map.SetPixel(X, Y, Color.Red);
|
_map.SetPixel(X, Y, Color.Red);
|
||||||
|
|
||||||
//if (checkIsPositionBlockedByObjekts(new LSL_Vector(X, Y, 0)) == true)
|
if (checkIsPositionBlockedByObjekts(X, Y) == true)
|
||||||
//_map.SetPixel(X, Y, Color.Yellow);
|
_map.SetPixel(X, Y, Color.Yellow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue