fix mouse

This commit is contained in:
2026-02-06 10:09:56 -08:00
parent 513602e551
commit 3c31de9f9f

View File

@@ -153,10 +153,10 @@ fn run_roblox_bot_in_strafe_client_physics(physics_data:&PhysicsData,block:&v0::
(mask,new_controls)
};
// detect mouse changes
let mouse=(input.event.mouse_pos.x!=last_mouse.x||input.event.mouse_pos.y!=last_mouse.y).then(||{
last_mouse=&input.event.mouse_pos;
let mouse=(event.event.mouse_pos.x!=last_mouse.x||event.event.mouse_pos.y!=last_mouse.y).then(||{
last_mouse=&event.event.mouse_pos;
Instruction::Mouse(MouseInstruction::SetNextMouse(MouseState{
pos:[input.event.mouse_pos.x as i32,input.event.mouse_pos.y as i32].into(),
pos:[event.event.mouse_pos.x as i32,event.event.mouse_pos.y as i32].into(),
time,
}))
});