1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-27 20:34:03 +00:00

Don't set CPU controls outside of training

This commit is contained in:
jugeeya 2023-08-15 23:57:38 -07:00 committed by GitHub
parent 10ebff5a6f
commit 6f1e4af332
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;