Skip to content

Commit 2df0533

Browse files
committed
Fix simulator running every frame
1 parent 7574a9b commit 2df0533

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Assets/Scripts/OpenTS2/Game/Simulator.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ private void Update()
4444
{
4545
_timer += Time.deltaTime;
4646
var timesToTick = Mathf.FloorToInt(_timer / TickRate);
47-
_virtualMachine.Tick();
47+
for (var i = 0; i < timesToTick; i++)
48+
{
49+
_virtualMachine.Tick();
50+
}
4851
_timer -= timesToTick * TickRate;
4952
}
5053

0 commit comments

Comments
 (0)