1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-10-03 01:34:27 +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)
}
// 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,