2023-02-12 01:07:29 +00:00
|
|
|
use smash::app::{lua_bind::StatusModule, BattleObjectModuleAccessor};
|
2022-06-16 17:38:33 +00:00
|
|
|
use smash::lib::lua_const::*;
|
|
|
|
|
2023-02-12 01:07:29 +00:00
|
|
|
use crate::common::consts::OnOff;
|
|
|
|
use crate::common::*;
|
|
|
|
|
2022-06-16 17:38:33 +00:00
|
|
|
pub unsafe fn mod_get_stick_y(module_accessor: &mut BattleObjectModuleAccessor) -> Option<f32> {
|
|
|
|
if !is_operation_cpu(module_accessor) {
|
|
|
|
return None;
|
|
|
|
}
|
|
|
|
let fighter_status_kind = StatusModule::status_kind(module_accessor);
|
|
|
|
|
|
|
|
if MENU.crouch == OnOff::On
|
|
|
|
&& [
|
2023-02-12 01:07:29 +00:00
|
|
|
*FIGHTER_STATUS_KIND_WAIT,
|
|
|
|
*FIGHTER_STATUS_KIND_SQUAT,
|
|
|
|
*FIGHTER_STATUS_KIND_SQUAT_B,
|
|
|
|
*FIGHTER_STATUS_KIND_SQUAT_F,
|
|
|
|
*FIGHTER_STATUS_KIND_SQUAT_RV,
|
|
|
|
*FIGHTER_STATUS_KIND_SQUAT_WAIT,
|
|
|
|
]
|
2022-06-16 17:38:33 +00:00
|
|
|
.contains(&fighter_status_kind)
|
|
|
|
{
|
|
|
|
Some(-1.0)
|
|
|
|
} else {
|
|
|
|
None
|
|
|
|
}
|
|
|
|
}
|