try to fix line
parent
1c19deb736
commit
a773c28a73
|
@ -233,47 +233,48 @@ namespace OpenSim.Modules.PathFinding
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector3 _PointA = new Vector3(0, 0, 0);
|
||||||
|
Vector3 _PointB = new Vector3(0, 0, 0);
|
||||||
|
|
||||||
if ((int)start.X != (int)target.X)
|
if ((int)start.X != (int)target.X)
|
||||||
{
|
{
|
||||||
int difference = (int)start.X - (int)target.X;
|
if((int)start.X < (int)target.X)
|
||||||
|
|
||||||
while (difference != 0)
|
|
||||||
{
|
{
|
||||||
Vector3 _position = start;
|
_PointA = start;
|
||||||
if (difference < 0)
|
_PointB = target;
|
||||||
{
|
}
|
||||||
_position.X = _position.X - 1;
|
|
||||||
setPositionData(requestData, _position, walkable, 0);
|
if ((int)start.X > (int)target.X)
|
||||||
difference++;
|
{
|
||||||
}
|
_PointA = target;
|
||||||
else
|
_PointB = start;
|
||||||
{
|
}
|
||||||
_position.X = _position.X + 1;
|
|
||||||
setPositionData(requestData, _position, walkable, 0);
|
while ((int)_PointA.X != _PointB.X)
|
||||||
difference--;
|
{
|
||||||
}
|
setPositionData(requestData, _PointA, walkable, 0);
|
||||||
|
_PointA.X = (int)_PointA.X + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((int)start.Y != (int)target.Y)
|
if ((int)start.Y != (int)target.Y)
|
||||||
{
|
{
|
||||||
int difference = (int)start.Y - (int)target.Y;
|
if ((int)start.Y < (int)target.Y)
|
||||||
|
|
||||||
while (difference != 0)
|
|
||||||
{
|
{
|
||||||
Vector3 _position = start;
|
_PointA = start;
|
||||||
if (difference < 0)
|
_PointB = target;
|
||||||
{
|
}
|
||||||
_position.Y = _position.Y - 1;
|
|
||||||
setPositionData(requestData, _position, walkable, 0);
|
if ((int)start.Y > (int)target.Y)
|
||||||
difference++;
|
{
|
||||||
}
|
_PointA = target;
|
||||||
else
|
_PointB = start;
|
||||||
{
|
}
|
||||||
_position.Y = _position.Y + 1;
|
|
||||||
setPositionData(requestData, _position, walkable, 0);
|
while ((int)_PointA.Y != _PointB.Y)
|
||||||
difference--;
|
{
|
||||||
}
|
setPositionData(requestData, _PointA, walkable, 0);
|
||||||
|
_PointA.Y = (int)_PointA.Y + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,7 +328,7 @@ namespace OpenSim.Modules.PathFinding
|
||||||
#region Script Funktions
|
#region Script Funktions
|
||||||
|
|
||||||
[ScriptInvocation]
|
[ScriptInvocation]
|
||||||
public string osGeneratePathEnv(UUID hostID, UUID scriptID, int size)
|
public string osGeneratePathEnv(UUID hostID, UUID scriptID)
|
||||||
{
|
{
|
||||||
UUID requestKey = UUID.Random();
|
UUID requestKey = UUID.Random();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue