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

Fix Aerials (#142)

* Revert "Unnecessary global for aerial action buffer (#141)"

This reverts commit 4cc66547c0.

* Remove Check

Non Aerials will just return None in
into_attack_air_kind()
This commit is contained in:
sidschingis 2020-08-20 00:28:33 +02:00 committed by GitHub
parent 7a5210b012
commit 5fee828169
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@ use crate::training::shield;
use smash::app::{self, lua_bind::*};
use smash::lib::lua_const::*;
static mut CURRENT_AERIAL: Action = Action::NAIR;
static mut QUEUE: Vec<Action> = vec![];
static mut FALLING_AERIAL: bool = false;
@ -68,8 +69,8 @@ pub fn full_reset(){
}
pub fn set_aerial(attack: Action) {
if !shield::is_aerial(attack) {
return;
unsafe {
CURRENT_AERIAL = attack;
}
}
@ -84,7 +85,7 @@ pub unsafe fn get_attack_air_kind(
return None;
}
get_current_buffer().into_attack_air_kind()
CURRENT_AERIAL.into_attack_air_kind()
}
pub unsafe fn get_command_flag_cat(