mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Take inaccessible waypoints into account when drawing waypoint sequences.
This commit is contained in:
parent
24cde6b555
commit
f4ff4ad1d5
1 changed files with 16 additions and 4 deletions
|
@ -1479,15 +1479,27 @@ namespace CodeImp.DoomBuilder.Rendering
|
|||
Rectangle = new RectangleF(waypoints[i].Position.x, waypoints[i].Position.y, 0.0f, 0.0f)
|
||||
};
|
||||
}
|
||||
if (iNext < size && waypoints[iNext].AngleDoom == waypoints[i].AngleDoom + 1) // next waypoint of this sequence?
|
||||
RenderLine(waypoints[i].Position, waypoints[iNext].Position, 1.5f, General.Colors.WaypointColor, true);
|
||||
else if (iNext < size && waypoints[iNext].AngleDoom == waypoints[i].AngleDoom) // mark duplicate waypoints
|
||||
if (iNext < size && waypoints[iNext].AngleDoom == waypoints[i].AngleDoom + 1)
|
||||
{
|
||||
// draw line between this waypoint and the next
|
||||
RenderLine(waypoints[i].Position, waypoints[iNext].Position, 1.5f, General.Colors.WaypointColor, true);
|
||||
}
|
||||
else if (iNext < size && waypoints[iNext].AngleDoom == waypoints[i].AngleDoom)
|
||||
{
|
||||
// mark duplicate waypoints
|
||||
RenderCircle(waypoints[i].Position, 32f, 1f, PixelColor.FromColor(Color.Red), true);
|
||||
RenderCircle(waypoints[iNext].Position, 32f, 1f, PixelColor.FromColor(Color.Red), true);
|
||||
}
|
||||
else // draw different line between last and first waypoint of this sequence
|
||||
else if (iNext < size && i > 0 && waypoints[i].AngleDoom - waypoints[i - 1].AngleDoom > 1 && waypoints[iNext].AngleDoom > waypoints[seqStart].AngleDoom + 255)
|
||||
{
|
||||
// mark inaccessible waypoints
|
||||
RenderCircle(waypoints[i].Position, 32f, 1f, PixelColor.FromColor(Color.Red), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
// draw different line between last and first waypoint of this sequence
|
||||
RenderLine(waypoints[i].Position, waypoints[seqStart].Position, 0.75f, General.Colors.WaypointLoopColor, true);
|
||||
}
|
||||
i = iNext;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue