Browse Source

Update PlayerReplay.cs

Kenkart 2 years ago
parent
commit
9e6ef80bf6
1 changed files with 8 additions and 3 deletions
  1. 8 3
      Assets/Scripts/PlayerReplay.cs

+ 8 - 3
Assets/Scripts/PlayerReplay.cs

@@ -260,7 +260,7 @@ public class PlayerReplay : MonoBehaviour
                     }
                 }
             }
-            
+
             // Add last step of demo
             filteredJointsData.Add(jointsDataDemo[jointsDataDemo.Count - 1]);
 
@@ -286,17 +286,22 @@ public class PlayerReplay : MonoBehaviour
             jointsDataDemo.Clear();
             recordingTimesDemo.Clear();
 
-            // Input for end steps. Wait for input if finish comparing. Not if comparing is interupted.
+            // Input for end steps. Wait for input if finish comparing. Don't wait for input if comparing is interupted.
             if (!bc.endStepsPressed)
             {
                 yield return ViveInput.WaitForControllerPress();
             }
+            else
+            {
+                // Reset
+                bc.endStepsPressed = false;
+            }
 
             // Wait for input
             yield return ViveInput.WaitForControllerPress();
 
             Destroy(body);
-            
+
             if (finish)
                 break;
         }