[chronojump] Two more run double contacts fixes



commit b00ce946dd058afbecc60f8ca5f3bbf51a786ce2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Apr 13 23:47:42 2018 +0200

    Two more run double contacts fixes

 src/execute/run.cs        |   10 +++++++++-
 src/execute/runObjects.cs |    3 ++-
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/execute/run.cs b/src/execute/run.cs
index 86c7708..88095ca 100644
--- a/src/execute/run.cs
+++ b/src/execute/run.cs
@@ -489,8 +489,16 @@ public class RunExecute : EventExecute
                                        runDC.UpdateStartPos(posOfBiggestTC);
                                        return;
                                }
+                               else
+                               {
+                                       //if leaving: start pos will be on first TF
+                                       if(speedStart && ! speedStartArrival && runPTL.FirstRPIs == 0)
+                                       {
+                                               runPTL.FirstRPIs = 1;
+                                               runDC.UpdateStartPos(1);
+                                       }
+                               }
 
-                               //if is not double contact then track will be created
                        }
 
                        trackTime = runDC.GetTrackTimeInSecondsAndUpdateStartPos(); //will come in seconds
diff --git a/src/execute/runObjects.cs b/src/execute/runObjects.cs
index 1a0714f..003a37f 100644
--- a/src/execute/runObjects.cs
+++ b/src/execute/runObjects.cs
@@ -601,7 +601,8 @@ public class RunPhaseTimeList
 
                //when track ends, last phase is a TC, add it
                if(ptLast != null && ptLast.IsContact)
-                       list_in.Add(currentMS/1000.0 + ":" + (currentMS + ptLast.Duration)/1000.0); //in 
seconds
+                       list_in.Add( startInMS/1000.0 + ":" +
+                                       (startInMS + ptLast.Duration)/1000.0); //in seconds
 
                //manage the negative values
                if(negativeValues > 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]