1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-10-03 09:44:26 +00:00

Simplify Condition

Removed need to check for no DI twice
This commit is contained in:
sidschingis 2020-06-13 21:35:03 +02:00
parent 715c28dd6c
commit cca5072185

View file

@ -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,