1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-12-01 06:09:38 +00:00

Format Rust code using rustfmt

This commit is contained in:
github-actions[bot] 2022-02-20 21:56:22 +00:00 committed by GitHub
parent e18b02e985
commit 54f4e002fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 47 additions and 11 deletions

View file

@ -3,7 +3,7 @@ use crate::hitbox_visualizer;
use skyline::hooks::{getRegionAddress, InlineCtx, Region}; use skyline::hooks::{getRegionAddress, InlineCtx, Region};
use skyline::nn::hid::*; use skyline::nn::hid::*;
use skyline::nn::ro::LookupSymbol; use skyline::nn::ro::LookupSymbol;
use smash::app::{self, lua_bind::*, enSEType}; use smash::app::{self, enSEType, lua_bind::*};
use smash::lib::lua_const::*; use smash::lib::lua_const::*;
use smash::params::*; use smash::params::*;
use smash::phx::{Hash40, Vector3f}; use smash::phx::{Hash40, Vector3f};
@ -385,14 +385,30 @@ pub unsafe fn handle_se(
bool2: bool, bool2: bool,
bool3: bool, bool3: bool,
bool4: bool, bool4: bool,
se_type: enSEType se_type: enSEType,
) -> u64 { ) -> u64 {
// Make effects silent while we're killing fighters. Stops death explosion and fighter misfoot. // Make effects silent while we're killing fighters. Stops death explosion and fighter misfoot.
if save_states::is_killing() { if save_states::is_killing() {
let silent_hash = Hash40::new("se_silent"); let silent_hash = Hash40::new("se_silent");
return original!()(module_accessor,silent_hash,bool1,bool2,bool3,bool4,se_type); return original!()(
module_accessor,
silent_hash,
bool1,
bool2,
bool3,
bool4,
se_type,
);
} }
original!()(module_accessor, my_hash,bool1,bool2,bool3,bool4,se_type) original!()(
module_accessor,
my_hash,
bool1,
bool2,
bool3,
bool4,
se_type,
)
} }
#[skyline::hook(replace = EffectModule::req)] // hooked to prevent death gfx from playing when loading save states #[skyline::hook(replace = EffectModule::req)] // hooked to prevent death gfx from playing when loading save states
@ -405,13 +421,33 @@ pub unsafe fn handle_effect(
arg6: u32, arg6: u32,
arg7: i32, arg7: i32,
arg8: bool, arg8: bool,
arg9: i32 arg9: i32,
) -> u64 { ) -> u64 {
if save_states::is_killing() { if save_states::is_killing() {
// Making the size 0 prevents these effects from being displayed. Fixs throw explosions, ICs squall, etc. // Making the size 0 prevents these effects from being displayed. Fixs throw explosions, ICs squall, etc.
return original!()(module_accessor,eff_hash,pos,rot,0.0,arg6,arg7,arg8,arg9); return original!()(
module_accessor,
eff_hash,
pos,
rot,
0.0,
arg6,
arg7,
arg8,
arg9,
);
} }
original!()(module_accessor,eff_hash,pos,rot,size,arg6,arg7,arg8,arg9) original!()(
module_accessor,
eff_hash,
pos,
rot,
size,
arg6,
arg7,
arg8,
arg9,
)
} }
#[allow(improper_ctypes)] #[allow(improper_ctypes)]

View file

@ -277,7 +277,7 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor)
module_accessor, module_accessor,
Hash40::new("se_system_position_reset"), Hash40::new("se_system_position_reset"),
true, true,
true true,
); );
} }
} }