@@ -209,7 +209,7 @@ pub unsafe fn check_guard_attack_special_hi(
209
209
false . into ( )
210
210
}
211
211
212
- pub unsafe fn check_cstick_escape_oos ( fighter : & mut L2CFighterCommon ) -> L2CValue {
212
+ pub unsafe fn check_cstick_escape_oos ( fighter : & mut L2CFighterCommon , should_transition : bool ) -> L2CValue {
213
213
let boma = fighter. module_accessor ;
214
214
215
215
let c_stick_override = fighter. is_button_on ( Buttons :: CStickOverride ) ;
@@ -255,21 +255,23 @@ pub unsafe fn check_cstick_escape_oos(fighter: &mut L2CFighterCommon) -> L2CValu
255
255
256
256
for ( term, condition, status) in escapes. iter ( ) {
257
257
if WorkModule :: is_enable_transition_term ( boma, * term) && * condition {
258
- // NOTE: DO NOT TOUCH
259
- // We must pass `false` to `change_status` so that the game does not clear our buffer/pad flag.
260
- // When it is done via `change_status`, the game will regenerate them the next time `sub_shift_status_main` is called.
261
- fighter. change_status ( ( * status) . into ( ) , false . into ( ) ) ;
262
- // We then must pass `true` to `clear_command` so that game "forgets" that we cleared our buffer
263
- // and will not regenerate our pad flags
264
- ControlModule :: clear_command ( fighter. module_accessor , true ) ;
258
+ if should_transition {
259
+ // NOTE: DO NOT TOUCH
260
+ // We must pass `false` to `change_status` so that the game does not clear our buffer/pad flag.
261
+ // When it is done via `change_status`, the game will regenerate them the next time `sub_shift_status_main` is called.
262
+ fighter. change_status ( ( * status) . into ( ) , false . into ( ) ) ;
263
+ // We then must pass `true` to `clear_command` so that game "forgets" that we cleared our buffer
264
+ // and will not regenerate our pad flags
265
+ ControlModule :: clear_command ( fighter. module_accessor , true ) ;
266
+ }
265
267
return true . into ( ) ;
266
268
}
267
269
}
268
270
269
271
return false . into ( ) ;
270
272
}
271
273
272
- pub unsafe fn check_escape_oos ( fighter : & mut L2CFighterCommon ) -> L2CValue {
274
+ pub unsafe fn check_escape_oos ( fighter : & mut L2CFighterCommon , should_transition : bool ) -> L2CValue {
273
275
let boma = fighter. module_accessor ;
274
276
275
277
let escapes = [
@@ -292,13 +294,15 @@ pub unsafe fn check_escape_oos(fighter: &mut L2CFighterCommon) -> L2CValue {
292
294
293
295
for ( term, condition, status) in escapes. iter ( ) {
294
296
if WorkModule :: is_enable_transition_term ( boma, * term) && * condition {
295
- // NOTE: DO NOT TOUCH
296
- // We must pass `false` to `change_status` so that the game does not clear our buffer/pad flag.
297
- // When it is done via `change_status`, the game will regenerate them the next time `sub_shift_status_main` is called.
298
- fighter. change_status ( ( * status) . into ( ) , false . into ( ) ) ;
299
- // We then must pass `true` to `clear_command` so that game "forgets" that we cleared our buffer
300
- // and will not regenerate our pad flags
301
- ControlModule :: clear_command ( fighter. module_accessor , true ) ;
297
+ if should_transition {
298
+ // NOTE: DO NOT TOUCH
299
+ // We must pass `false` to `change_status` so that the game does not clear our buffer/pad flag.
300
+ // When it is done via `change_status`, the game will regenerate them the next time `sub_shift_status_main` is called.
301
+ fighter. change_status ( ( * status) . into ( ) , false . into ( ) ) ;
302
+ // We then must pass `true` to `clear_command` so that game "forgets" that we cleared our buffer
303
+ // and will not regenerate our pad flags
304
+ ControlModule :: clear_command ( fighter. module_accessor , true ) ;
305
+ }
302
306
return true . into ( ) ;
303
307
}
304
308
}
@@ -431,7 +435,7 @@ pub unsafe fn sub_guard_cont(fighter: &mut L2CFighterCommon) -> L2CValue {
431
435
}
432
436
433
437
if !guard_hold {
434
- if check_escape_oos ( fighter) . get_bool ( ) || check_cstick_escape_oos ( fighter) . get_bool ( ) {
438
+ if check_escape_oos ( fighter, true ) . get_bool ( ) || check_cstick_escape_oos ( fighter, true ) . get_bool ( ) {
435
439
return true . into ( ) ;
436
440
}
437
441
}
0 commit comments