mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-03-22 14:26:11 +00:00
Simplify Condition
Removed need to check for no DI twice
This commit is contained in:
parent
715c28dd6c
commit
cca5072185
1 changed files with 5 additions and 5 deletions
|
@ -39,16 +39,16 @@ unsafe fn mod_handle_di(fighter: &mut L2CFighterCommon, _arg1: L2CValue) {
|
||||||
DI_ANGLE = direction_to_angle(MENU.di_state)
|
DI_ANGLE = direction_to_angle(MENU.di_state)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If facing left, reverse angle
|
|
||||||
if DI_ANGLE != ANGLE_NONE && PostureModule::lr(module_accessor) != FIGHTER_FACING_RIGHT {
|
|
||||||
DI_ANGLE -= PI;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Nothig to do on no DI
|
// Nothig to do on no DI
|
||||||
if DI_ANGLE == ANGLE_NONE {
|
if DI_ANGLE == ANGLE_NONE {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If facing left, reverse angle
|
||||||
|
if PostureModule::lr(module_accessor) != FIGHTER_FACING_RIGHT {
|
||||||
|
DI_ANGLE -= PI;
|
||||||
|
}
|
||||||
|
|
||||||
WorkModule::set_float(
|
WorkModule::set_float(
|
||||||
module_accessor,
|
module_accessor,
|
||||||
DI_ANGLE.cos() as f32,
|
DI_ANGLE.cos() as f32,
|
||||||
|
|
Loading…
Add table
Reference in a new issue