From b9e34f53c3511f0e910ffa93bc378d435b983117 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 8 Aug 2024 13:18:28 -0700 Subject: [PATCH] do not set time on idle --- src/physics.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/physics.rs b/src/physics.rs index daacd0b..4966f90 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -1272,6 +1272,7 @@ fn run_teleport_behaviour(wormhole:&Option,models } fn atomic_internal_instruction(state:&mut PhysicsState,data:&PhysicsData,ins:TimedInstruction){ + state.time=ins.time; let should_advance_body=match ins.instruction{ PhysicsInternalInstruction::CollisionStart(_) |PhysicsInternalInstruction::CollisionEnd(_) @@ -1459,6 +1460,7 @@ fn atomic_internal_instruction(state:&mut PhysicsState,data:&PhysicsData,ins:Tim } fn atomic_input_instruction(state:&mut PhysicsState,data:&PhysicsData,ins:TimedInstruction){ + state.time=ins.time; let should_advance_body=match ins.instruction{ //the body may as well be a quantum wave function //as far as these instruction are concerned (they don't care where it is) @@ -1587,8 +1589,9 @@ fn atomic_input_instruction(state:&mut PhysicsState,data:&PhysicsData,ins:TimedI if ins.time(), PhysicsInstruction::Internal(instruction)=>atomic_internal_instruction(state,data,TimedInstruction{time:ins.time,instruction}), PhysicsInstruction::Input(instruction)=>atomic_input_instruction(state,data,TimedInstruction{time:ins.time,instruction}), }