File tree Expand file tree Collapse file tree 1 file changed +22
-16
lines changed Expand file tree Collapse file tree 1 file changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -590,30 +590,36 @@ void FixedUpdate()
590590 return ;
591591 }
592592
593- if ( ApiLock . IsUnlocked && Time . timeScale ! = 0.0f )
593+ if ( ! ApiLock . IsUnlocked || Time . timeScale = = 0.0f )
594594 {
595- if ( FrameLimit != 0 && CurrentFrame >= FrameLimit )
595+ return ;
596+ }
597+
598+ if ( FrameLimit != 0 )
599+ {
600+ if ( CurrentFrame >= FrameLimit )
596601 {
597602 // pause and notify API
598603 SimulatorManager . SetTimeScale ( 0.0f ) ;
599604 SendResult ( ) ;
605+ return ;
600606 }
601- else
602- {
603- if ( FrameLimit == 0 && ! API_Notified )
604- {
605- SendResult ( ) ;
606- API_Notified = true ;
607- }
608- CurrentTime += Time . fixedDeltaTime ;
609- CurrentFrame += 1 ;
607+ }
608+ else if ( ! API_Notified )
609+ {
610+ SendResult ( ) ;
611+ API_Notified = true ;
612+ }
610613
611- if ( ! CurrentSceneId . IsNullOrEmpty ( ) )
612- {
613- SimulatorManager . Instance . PhysicsUpdate ( ) ;
614- }
615- }
614+ CurrentTime += Time . fixedDeltaTime ;
615+ CurrentFrame += 1 ;
616+
617+ if ( CurrentSceneId . IsNullOrEmpty ( ) )
618+ {
619+ return ;
616620 }
621+
622+ SimulatorManager . Instance . PhysicsUpdate ( ) ;
617623 }
618624
619625 public void ReceiveMessage ( IPeerManager sender , DistributedMessage distributedMessage )
You can’t perform that action at this time.
0 commit comments