1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-10-03 01:34:27 +00:00

Bugfix: Save State Jostle (#299)

* Fix in !is_dead

* Move fix to get_param_int to fix all deaths

* Update save_states.rs

Reword comment to reflect the situation the code is called in
This commit is contained in:
GradualSyrup 2022-01-06 01:47:36 -06:00 committed by GitHub
parent a67b7af6ff
commit 050792a01c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,12 +66,17 @@ pub unsafe fn should_mirror() -> f32 {
}
pub unsafe fn get_param_int(
_module_accessor: &mut app::BattleObjectModuleAccessor,
module_accessor: &mut app::BattleObjectModuleAccessor,
param_type: u64,
param_hash: u64,
) -> Option<i32> {
if param_type == hash40("common") {
if param_hash == hash40("dead_rebirth_wait_frame") {
let jostle_frame = WorkModule::get_int(module_accessor, *FIGHTER_INSTANCE_WORK_ID_INT_HIT_STOP_IGNORE_JOSTLE_FRAME);
if jostle_frame > 1 {
// Allow jostle to stop being ignored before we respawn
WorkModule::set_int(module_accessor, 1, *FIGHTER_INSTANCE_WORK_ID_INT_HIT_STOP_IGNORE_JOSTLE_FRAME);
}
return Some(1);
}
if param_hash == hash40("rebirth_move_frame") {