mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-24 02:44:17 +00:00
safer option usage
This commit is contained in:
parent
7e6267817e
commit
d7a00e7227
1 changed files with 6 additions and 4 deletions
|
@ -173,10 +173,12 @@ fn into_transition_term(starting_status: StartingStatus) -> i32 {
|
|||
}
|
||||
|
||||
pub unsafe fn handle_recording() {
|
||||
let player_module_accessor = get_module_accessor(FighterId::Player);
|
||||
let cpu_module_accessor = get_module_accessor(FighterId::CPU);
|
||||
handle_recording_for_fighter(&mut *player_module_accessor);
|
||||
handle_recording_for_fighter(&mut *cpu_module_accessor);
|
||||
let player_module_accessor = try_get_module_accessor(FighterId::Player);
|
||||
let cpu_module_accessor = try_get_module_accessor(FighterId::CPU);
|
||||
if player_module_accessor.is_some() && cpu_module_accessor.is_some() {
|
||||
handle_recording_for_fighter(&mut *player_module_accessor.unwrap());
|
||||
handle_recording_for_fighter(&mut *cpu_module_accessor.unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn handle_recording_for_fighter(module_accessor: &mut BattleObjectModuleAccessor) {
|
||||
|
|
Loading…
Reference in a new issue