Skip to content

Commit 476af37

Browse files
committed
djc fix pr fix pr fix
1 parent 9754359 commit 476af37

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

fighters/common/src/djc.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ pub unsafe extern "C" fn sub_attack_air_inherit_jump_aerial_motion_uniq_process_
5555

5656
fighter.sub_attack_air_kind();
5757
if motion_kind == smash::hash40("jump_aerial_f") || motion_kind == smash::hash40("jump_aerial_b") {
58-
if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION)
59-
&& (ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_JUMP)
60-
|| MotionModule::frame_2nd(fighter.module_accessor) < 2.0) {
58+
if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION){
6159
MotionModule::add_motion_2nd(fighter.module_accessor, Hash40::new_raw(motion_kind), frame, 1.0, false, 1.0);
6260
MotionModule::set_weight(fighter.module_accessor, 1.0, true);
6361
KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION_2ND);
@@ -87,7 +85,6 @@ fn sub_attack_air_inherit_jump_aerial_motion_uniq_process_init(fighter: &mut L2C
8785
pub unsafe extern "C" fn sub_attack_air_inherit_jump_aerial_motion_uniq_process_exec_impl(fighter: &mut L2CFighterCommon) -> L2CValue {
8886
if KineticModule::get_kinetic_type(fighter.module_accessor) == *FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION_2ND
8987
&& fighter.global_table[FIGHTER_KIND] != FIGHTER_KIND_DEMON
90-
&& !fighter.is_in_hitlag()
9188
&& MotionModule::frame_2nd(fighter.module_accessor) >= 2.0
9289
&& fighter.global_table[CURRENT_FRAME].get_i32() <= ParamModule::get_int(fighter.battle_object, ParamType::Common, "djc_leniency_frame")
9390
&& ControlModule::check_button_off(fighter.module_accessor, *CONTROL_PAD_BUTTON_JUMP) {

fighters/trail/src/status/attack_air.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ pub unsafe fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue {
6060

6161
fighter.sub_attack_air_kind();
6262
if motion_kind == smash::hash40("jump_aerial_f") || motion_kind == smash::hash40("jump_aerial_b") {
63-
if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION)
64-
&& (ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_JUMP)
65-
|| MotionModule::frame_2nd(fighter.module_accessor) < 2.0) {
63+
if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION) {
6664
MotionModule::add_motion_2nd(fighter.module_accessor, Hash40::new_raw(motion_kind), frame, 1.0, false, 1.0);
6765
MotionModule::set_weight(fighter.module_accessor, 1.0, true);
6866
KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION_2ND);
@@ -135,9 +133,7 @@ unsafe extern "C" fn sub_attack_air_n(fighter: &mut L2CFighterCommon) {
135133
return;
136134
}
137135
}
138-
if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION)
139-
&& (ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_JUMP)
140-
|| MotionModule::frame_2nd(fighter.module_accessor) < 2.0) {
136+
if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION) {
141137
MotionModule::add_motion_2nd(fighter.module_accessor, Hash40::new_raw(motion_kind), frame, 1.0, false, 1.0);
142138
MotionModule::set_weight(fighter.module_accessor, 1.0, true);
143139
KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION_2ND);
@@ -220,9 +216,7 @@ unsafe extern "C" fn sub_attack_air_f(fighter: &mut L2CFighterCommon) {
220216
return;
221217
}
222218
}
223-
if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION)
224-
&& (ControlModule::check_button_on(fighter.module_accessor, *CONTROL_PAD_BUTTON_JUMP)
225-
|| MotionModule::frame_2nd(fighter.module_accessor) < 2.0) {
219+
if !WorkModule::is_flag(fighter.module_accessor, *FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION) {
226220
MotionModule::add_motion_2nd(fighter.module_accessor, Hash40::new_raw(motion_kind), frame, 1.0, false, 1.0);
227221
MotionModule::set_weight(fighter.module_accessor, 1.0, true);
228222
KineticModule::change_kinetic(fighter.module_accessor, *FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION_2ND);

0 commit comments

Comments
 (0)