1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2025-03-14 02:16:10 +00:00

Unnecessary global for aerial action buffer (#141)

Can just use the current buffer value
This commit is contained in:
sidschingis 2020-08-18 19:34:57 +02:00 committed by GitHub
parent 53c361686f
commit 4cc66547c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,6 @@ 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;
@ -72,10 +71,6 @@ pub fn set_aerial(attack: Action) {
if !shield::is_aerial(attack) {
return;
}
unsafe {
CURRENT_AERIAL = attack;
}
}
pub unsafe fn get_attack_air_kind(
@ -89,7 +84,7 @@ pub unsafe fn get_attack_air_kind(
return None;
}
CURRENT_AERIAL.into_attack_air_kind()
get_current_buffer().into_attack_air_kind()
}
pub unsafe fn get_command_flag_cat(