mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-01-31 22:47:25 +00:00
Update Mash (#118)
* Update mash.rs Use StatusModule::change_status_request_from_script * Extract Method * Fix Air Dodge * Add Reset Trigger * Update Mash Split up buffering and performing the action Moved performing hook to fix being a frame late
This commit is contained in:
parent
e4850705fe
commit
1063aa5482
2 changed files with 20 additions and 1 deletions
|
@ -97,11 +97,29 @@ pub unsafe fn get_command_flag_cat(
|
|||
|
||||
check_buffer(module_accessor);
|
||||
|
||||
perform_action(module_accessor)
|
||||
return 0;
|
||||
}
|
||||
|
||||
pub fn handle_mash(module_accessor: &mut app::BattleObjectModuleAccessor){
|
||||
unsafe{
|
||||
if !is_operation_cpu(module_accessor) {
|
||||
return;
|
||||
}
|
||||
|
||||
perform_action(module_accessor);
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn check_buffer(module_accessor: &mut app::BattleObjectModuleAccessor) {
|
||||
if QUEUE.len() > 0 {
|
||||
/*
|
||||
Reset when CPU is idle to prevent deadlocks
|
||||
and to reset when using the training mode reset
|
||||
*/
|
||||
if is_idle(module_accessor) {
|
||||
reset();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ pub unsafe fn get_stick_y_no_clamp(module_accessor: &mut app::BattleObjectModule
|
|||
*/
|
||||
#[skyline::hook(replace = ControlModule::get_stick_x)]
|
||||
pub unsafe fn get_stick_x(module_accessor: &mut app::BattleObjectModuleAccessor) -> f32 {
|
||||
mash::handle_mash(module_accessor);
|
||||
left_stick::mod_get_stick_x(module_accessor).unwrap_or_else(|| original!()(module_accessor))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue