mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-20 00:46:34 +00:00
parent
e0645a071c
commit
ff6569b93b
2 changed files with 19 additions and 0 deletions
|
@ -281,6 +281,17 @@ pub unsafe fn handle_set_dead_rumble(lua_state: u64) -> u64 {
|
|||
original!()(lua_state)
|
||||
}
|
||||
|
||||
#[skyline::hook(replace = CameraModule::req_quake)]
|
||||
pub unsafe fn handle_req_quake(module_accessor: &mut app::BattleObjectModuleAccessor, my_int: i32) -> u64 {
|
||||
if !is_training_mode() {
|
||||
return original!()(module_accessor,my_int);
|
||||
}
|
||||
if save_states::is_killing() {
|
||||
return original!()(module_accessor, *CAMERA_QUAKE_KIND_NONE);
|
||||
}
|
||||
original!()(module_accessor,my_int)
|
||||
}
|
||||
|
||||
pub static mut COMMON_PARAMS: *mut CommonParams = 0 as *mut _;
|
||||
|
||||
fn params_main(params_info: &ParamsInfo<'_>) {
|
||||
|
@ -335,6 +346,7 @@ pub fn training_mods() {
|
|||
// Save states
|
||||
handle_get_param_int,
|
||||
handle_set_dead_rumble,
|
||||
handle_req_quake,
|
||||
// Mash attack
|
||||
handle_get_attack_air_kind,
|
||||
// Attack angle
|
||||
|
|
|
@ -50,6 +50,13 @@ static mut MIRROR_STATE: f32 = 1.0;
|
|||
// MIRROR_STATE == 1 -> Do not mirror
|
||||
// MIRROR_STATE == -1 -> Do Mirror
|
||||
|
||||
pub unsafe fn is_killing() -> bool {
|
||||
if SAVE_STATE_PLAYER.state == KillPlayer || SAVE_STATE_CPU.state == KillPlayer {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
pub unsafe fn should_mirror() -> f32 {
|
||||
match MENU.save_state_mirroring {
|
||||
SaveStateMirroring::None => 1.0,
|
||||
|
|
Loading…
Reference in a new issue