1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2025-03-14 02:16:10 +00:00

Only apply ledge::is_enable_transition_term to CPU (#212)

Co-authored-by: asimon-1 <asimon1@protonmail.com>
This commit is contained in:
asimon-1 2021-07-21 14:45:47 -07:00 committed by GitHub
parent 3973ff6d65
commit 6b87295216
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,11 +101,14 @@ pub unsafe fn is_enable_transition_term(
_module_accessor: *mut app::BattleObjectModuleAccessor,
term: i32,
) -> Option<bool> {
if !is_operation_cpu(&mut*_module_accessor) {
return None;
}
// Only handle ledge scenarios from menu
if StatusModule::status_kind(_module_accessor) as i32 != *FIGHTER_STATUS_KIND_CLIFF_WAIT || MENU.ledge_state == LedgeOption::empty() {
return None;
}
// Disallow the default cliff-climb if we are waiting
if LEDGE_CASE == LedgeOption::WAIT || frame_counter::get_frame_count(LEDGE_DELAY_COUNTER) < LEDGE_DELAY {
if term == *FIGHTER_STATUS_TRANSITION_TERM_ID_CONT_CLIFF_CLIMB {