diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 2ca8c1b9..3c72da76 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index 2d0a9541..e13f8c7f 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm index 77f43e0b..354e4c6c 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index bade1bb2..98d9f515 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/RenderableConnectedPaths.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/RenderableConnectedPaths.cs index 0330779e..37476796 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/RenderableConnectedPaths.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/Paths/RenderableConnectedPaths.cs @@ -97,8 +97,11 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs control.CurrentShader = defaultShaderProgram; defaultShaderProgram.SetVector4("LineColor", ColorUtility.ToVector4(LineColor)); + int groupID = 0; foreach (var group in PathGroups) { + int pathID = 0; + foreach (var path in group.PathPoints) { if (!path.RenderablePoint.Visible) @@ -116,14 +119,19 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs GL.LineWidth(2f); foreach (var nextPt in path.NextPoints) { + CheckInvalidConnection(nextPt, groupID, pathID); + GL.Color3(LineColor); GL.Begin(PrimitiveType.Lines); GL.Vertex3(path.Translate); GL.Vertex3(PathGroups[nextPt.PathID].PathPoints[nextPt.PtID].Translate); GL.End(); } + foreach (var prevPt in path.PrevPoints) { + CheckInvalidConnection(prevPt, groupID, pathID); + GL.Color3(LineColor); GL.Begin(PrimitiveType.Lines); GL.Vertex3(path.Translate); @@ -131,7 +139,28 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs GL.End(); } } + + pathID++; } + + groupID++; + } + } + + private void CheckInvalidConnection(PointID pathPoint, int groupID, int pathID) + { + try + { + var point = PathGroups[pathPoint.PathID].PathPoints[pathPoint.PtID]; + } + catch (Exception ex) + { + Switch_Toolbox.Library.Forms.STErrorDialog.Show($"Invalid path points! Group {groupID} Path {pathID}", "Path Creator", + $"Group {groupID} \n" + + $"Path {pathID} \n" + + $"Group ID {pathPoint.PathID} \n" + + $"Point ID {pathPoint.PtID} \n" + + $"{ex}"); } } } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 37bbf079..b022bbe5 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ