1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-24 02:44:17 +00:00

Ensure save states effect kills happen only in training (#509)

This commit is contained in:
jugeeya 2023-03-22 14:22:11 -07:00 committed by GitHub
parent c74a2b3432
commit 66477b346a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -405,6 +405,17 @@ pub unsafe fn handle_se(
bool4: bool,
se_type: enSEType,
) -> u64 {
if !is_training_mode() {
return original!()(
module_accessor,
my_hash,
bool1,
bool2,
bool3,
bool4,
se_type,
);
}
// Make effects silent while we're killing fighters. Stops death explosion and fighter misfoot.
if save_states::is_killing() {
let silent_hash = Hash40::new("se_silent");
@ -441,6 +452,19 @@ pub unsafe fn handle_effect(
arg8: bool,
arg9: i32,
) -> u64 {
if !is_training_mode() {
return original!()(
module_accessor,
eff_hash,
pos,
rot,
size,
arg6,
arg7,
arg8,
arg9,
);
}
if save_states::is_killing() {
// Making the size 0 prevents these effects from being displayed. Fixs throw explosions, ICs squall, etc.
return original!()(