1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-30 22:00:16 +00:00

use alternative DI method: based on player facing direction

This commit is contained in:
jugeeya 2020-08-12 20:29:31 -07:00
parent 4f779c6f57
commit ca4f0b3122

View file

@ -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;
}