From ca4f0b3122e3d4627b00299171df95ef43713a84 Mon Sep 17 00:00:00 2001 From: jugeeya Date: Wed, 12 Aug 2020 20:29:31 -0700 Subject: [PATCH] use alternative DI method: based on player facing direction --- src/training/directional_influence.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/training/directional_influence.rs b/src/training/directional_influence.rs index 32cdda4..51c7708 100644 --- a/src/training/directional_influence.rs +++ b/src/training/directional_influence.rs @@ -36,14 +36,9 @@ unsafe fn mod_handle_di(fighter: &mut L2CFighterCommon, _arg1: L2CValue) { return; } - let launch_speed_x = KineticEnergy::get_speed_x( - KineticModule::get_energy( - module_accessor, - *FIGHTER_KINETIC_ENERGY_ID_DAMAGE - ) as *mut smash::app::KineticEnergy); + let player_module_accessor = get_module_accessor(FighterId::Player); - // If we're launched left, reverse stick X - if launch_speed_x < 0.0 { + if PostureModule::lr(player_module_accessor) == -1.0 { angle = PI - angle; }