From 6f1e4af332a375e37968fcb452436125bc388cef Mon Sep 17 00:00:00 2001 From: jugeeya Date: Tue, 15 Aug 2023 23:57:38 -0700 Subject: [PATCH] Don't set CPU controls outside of training --- src/training/input_record.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/training/input_record.rs b/src/training/input_record.rs index b59b9e2..7625be6 100644 --- a/src/training/input_record.rs +++ b/src/training/input_record.rs @@ -423,6 +423,10 @@ pub unsafe fn handle_final_input_mapping(player_idx: i32, out: *mut MappedInputs #[skyline::hook(offset = 0x2da180)] // After cpu controls are assigned from ai calls unsafe fn set_cpu_controls(p_data: *mut *mut u8) { call_original!(p_data); + if !is_training_mode() { + return; + } + let controller_data = *p_data.add(1) as *mut ControlModuleInternal; let _controller_no = (*controller_data).controller_index;