@@ -61,7 +61,8 @@ pub unsafe fn init_attack_air(fighter: &mut L2CFighterCommon) -> L2CValue {
61
61
fighter. sub_attack_air_kind ( ) ;
62
62
if motion_kind == smash:: hash40 ( "jump_aerial_f" ) || motion_kind == smash:: hash40 ( "jump_aerial_b" ) {
63
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 ) {
64
+ && ( ControlModule :: check_button_on ( fighter. module_accessor , * CONTROL_PAD_BUTTON_JUMP )
65
+ || MotionModule :: frame_2nd ( fighter. module_accessor ) < 2.0 ) {
65
66
MotionModule :: add_motion_2nd ( fighter. module_accessor , Hash40 :: new_raw ( motion_kind) , frame, 1.0 , false , 1.0 ) ;
66
67
MotionModule :: set_weight ( fighter. module_accessor , 1.0 , true ) ;
67
68
KineticModule :: change_kinetic ( fighter. module_accessor , * FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION_2ND ) ;
@@ -134,16 +135,13 @@ unsafe extern "C" fn sub_attack_air_n(fighter: &mut L2CFighterCommon) {
134
135
return ;
135
136
}
136
137
}
137
- if !WorkModule :: is_flag ( fighter. module_accessor , * FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION ) {
138
- if ControlModule :: check_button_on ( fighter. module_accessor , * CONTROL_PAD_BUTTON_JUMP ) {
139
- MotionModule :: add_motion_2nd ( fighter. module_accessor , Hash40 :: new_raw ( motion_kind) , frame, 1.0 , false , 1.0 ) ;
140
- MotionModule :: set_weight ( fighter. module_accessor , 1.0 , true ) ;
141
- }
142
- }
143
- if ControlModule :: check_button_on ( fighter. module_accessor , * CONTROL_PAD_BUTTON_JUMP ) {
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 ) {
141
+ MotionModule :: add_motion_2nd ( fighter. module_accessor , Hash40 :: new_raw ( motion_kind) , frame, 1.0 , false , 1.0 ) ;
142
+ MotionModule :: set_weight ( fighter. module_accessor , 1.0 , true ) ;
144
143
KineticModule :: change_kinetic ( fighter. module_accessor , * FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION_2ND ) ;
145
- }
146
- else {
144
+ } else {
147
145
WorkModule :: on_flag ( fighter. module_accessor , * FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE ) ;
148
146
KineticModule :: change_kinetic ( fighter. module_accessor , * FIGHTER_KINETIC_TYPE_MOTION_FALL ) ;
149
147
}
@@ -222,14 +220,16 @@ unsafe extern "C" fn sub_attack_air_f(fighter: &mut L2CFighterCommon) {
222
220
return ;
223
221
}
224
222
}
225
- if !WorkModule :: is_flag ( fighter. module_accessor , * FIGHTER_INSTANCE_WORK_ID_FLAG_IGNORE_2ND_MOTION ) {
226
- MotionModule :: add_motion_2nd ( fighter. module_accessor , Hash40 :: new_raw ( motion_kind) , frame, 1.0 , false , 1.0 ) ;
227
- MotionModule :: set_weight ( fighter. module_accessor , 1.0 , true ) ;
228
- KineticModule :: change_kinetic ( fighter. module_accessor , * FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION_2ND ) ;
229
- } else {
230
- WorkModule :: on_flag ( fighter. module_accessor , * FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE ) ;
231
- KineticModule :: change_kinetic ( fighter. module_accessor , * FIGHTER_KINETIC_TYPE_MOTION_FALL ) ;
232
- }
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 ) {
226
+ MotionModule :: add_motion_2nd ( fighter. module_accessor , Hash40 :: new_raw ( motion_kind) , frame, 1.0 , false , 1.0 ) ;
227
+ MotionModule :: set_weight ( fighter. module_accessor , 1.0 , true ) ;
228
+ KineticModule :: change_kinetic ( fighter. module_accessor , * FIGHTER_KINETIC_TYPE_JUMP_AERIAL_MOTION_2ND ) ;
229
+ } else {
230
+ WorkModule :: on_flag ( fighter. module_accessor , * FIGHTER_INSTANCE_WORK_ID_FLAG_JUMP_NO_LIMIT_ONCE ) ;
231
+ KineticModule :: change_kinetic ( fighter. module_accessor , * FIGHTER_KINETIC_TYPE_MOTION_FALL ) ;
232
+ }
233
233
fighter. sub_attack_air_uniq_process_init ( ) ;
234
234
return ;
235
235
}
0 commit comments