This commit is contained in:
in0finite 2022-02-20 02:28:48 +01:00
parent 813dccfe0c
commit 30f69225ea
2 changed files with 20 additions and 0 deletions

View file

@ -28,6 +28,11 @@ namespace SanAndreasUnity.Behaviours
public float f, g;
public PathNodeId parentId;
public bool hasParent;
public override string ToString()
{
return $"(f {f}, g {g}{(hasParent ? $", parent {parentId}" : string.Empty)})";
}
}
private class NodeComparer : IComparer<PathNodeId>

View file

@ -49,6 +49,11 @@ namespace SanAndreasUnity.Importing.Paths
return ((AreaID << 5) + AreaID) ^ NodeID;
}
public override string ToString()
{
return $"(AreaID {AreaID}, NodeID {NodeID})";
}
public static PathNodeId InvalidId => new PathNodeId { AreaID = -1, NodeID = -1 };
}
@ -71,6 +76,11 @@ namespace SanAndreasUnity.Importing.Paths
return AreaID == other.AreaID && NodeID == other.NodeID;
}
public override string ToString()
{
return $"(Id {Id}, Position {Position}, PathWidth {PathWidth})";
}
public static PathNode InvalidNode => new PathNode { AreaID = -1, NodeID = -1 };
}
@ -95,6 +105,11 @@ namespace SanAndreasUnity.Importing.Paths
public int NodeID { get; set; }
public PathNodeId PathNodeId => new PathNodeId { AreaID = AreaID, NodeID = NodeID };
public int Length { get; set; }
public override string ToString()
{
return $"(AreaID {AreaID}, NodeID {NodeID}, Length {Length})";
}
}
public struct PathIntersectionFlags