mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-28 04:44:06 +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)
|
||||
}
|
||||
|
||||
// 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
|
||||
if DI_ANGLE == ANGLE_NONE {
|
||||
return;
|
||||
}
|
||||
|
||||
// If facing left, reverse angle
|
||||
if PostureModule::lr(module_accessor) != FIGHTER_FACING_RIGHT {
|
||||
DI_ANGLE -= PI;
|
||||
}
|
||||
|
||||
WorkModule::set_float(
|
||||
module_accessor,
|
||||
DI_ANGLE.cos() as f32,
|
||||
|
|
Loading…
Reference in a new issue