mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-30 22:00:16 +00:00
attempt to hardcode SET_TRAINING_FIXED_CAMERA_VALUES, which causes the crash whether hardcoded or replaced, maybe due to next hook failing?
This commit is contained in:
parent
1f32a641df
commit
19c4fe078d
2 changed files with 11 additions and 15 deletions
|
@ -127,19 +127,15 @@ static NEEDLE_CHANGE_ACTIVE_CAMERA: &[u8] = &[
|
||||||
];
|
];
|
||||||
impl_offset!(CHANGE_ACTIVE_CAMERA);
|
impl_offset!(CHANGE_ACTIVE_CAMERA);
|
||||||
|
|
||||||
// OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES = 0x3157bb0
|
// OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES = 0x3158830 (old: 0x3157bb0)
|
||||||
static NEEDLE_SET_TRAINING_FIXED_CAMERA_VALUES: &[u8] = &[
|
|
||||||
0x01, 0xe4, 0x00, 0x2f,
|
// static NEEDLE_SET_TRAINING_FIXED_CAMERA_VALUES: &[u8] = &[
|
||||||
0x20, 0x00, 0xc0, 0x3d,
|
// 0x01, 0xe4, 0x00, 0x2f,
|
||||||
0x22, 0x1c, 0xa1, 0x4e,
|
// 0x20, 0x00, 0xc0, 0x3d,
|
||||||
0x02, 0x44, 0x04, 0x6e,
|
// 0x22, 0x1c, 0xa1, 0x4e,
|
||||||
0xe8, 0x0a, 0x01, 0xf0,
|
// 0x02, 0x44, 0x04, 0x6e,
|
||||||
0x08, 0x81, 0x47, 0xf9,
|
// ];
|
||||||
0x08, 0x01, 0x40, 0xf9,
|
// impl_offset!(SET_TRAINING_FIXED_CAMERA_VALUES);
|
||||||
0x40, 0x04, 0x18, 0x6e,
|
|
||||||
0x00, 0xf5, 0x82, 0x3d,
|
|
||||||
];
|
|
||||||
impl_offset!(SET_TRAINING_FIXED_CAMERA_VALUES);
|
|
||||||
|
|
||||||
// OFFSET_DRAW = 0x4b620
|
// OFFSET_DRAW = 0x4b620
|
||||||
static NEEDLE_DRAW: &[u8] = &[
|
static NEEDLE_DRAW: &[u8] = &[
|
||||||
|
|
|
@ -8,7 +8,7 @@ use smash::phx::{Hash40, Vector3f};
|
||||||
use crate::common::consts::*;
|
use crate::common::consts::*;
|
||||||
use crate::common::offsets::OFFSET_CHANGE_ACTIVE_CAMERA;
|
use crate::common::offsets::OFFSET_CHANGE_ACTIVE_CAMERA;
|
||||||
|
|
||||||
use crate::common::offsets::OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES;
|
//use crate::common::offsets::OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES;
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use crate::training::{frame_counter, mash, save_states};
|
use crate::training::{frame_counter, mash, save_states};
|
||||||
|
|
||||||
|
@ -730,7 +730,7 @@ fn get_stage_camera_values(stage_id: i32) -> Option<Vector3f> {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We hook where the training fixed camera fields are initially set, so we can change them later if necessary
|
// We hook where the training fixed camera fields are initially set, so we can change them later if necessary
|
||||||
#[skyline::hook(offset = *OFFSET_SET_TRAINING_FIXED_CAMERA_VALUES)]
|
#[skyline::hook(offset = 0x3157bb0)] // TODO: Fix for 13.0.2
|
||||||
pub unsafe fn handle_set_training_fixed_camera_values(
|
pub unsafe fn handle_set_training_fixed_camera_values(
|
||||||
camera_manager: *mut u64, // not actually camera manager - is this even used?????
|
camera_manager: *mut u64, // not actually camera manager - is this even used?????
|
||||||
fixed_camera_values: &mut CameraValuesForTraining,
|
fixed_camera_values: &mut CameraValuesForTraining,
|
||||||
|
|
Loading…
Reference in a new issue