From 1e4fa4e00662cb7aceeec0f9c01db5d1c51d35bb Mon Sep 17 00:00:00 2001 From: sidschingis Date: Fri, 21 Aug 2020 17:42:47 +0200 Subject: [PATCH] Deref Constants (style) (#144) --- src/training/save_states.rs | 2 +- src/training/tech.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/training/save_states.rs b/src/training/save_states.rs index f3e0d0e..bda77f9 100644 --- a/src/training/save_states.rs +++ b/src/training/save_states.rs @@ -75,7 +75,7 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor, return; } - if category != FIGHTER_PAD_COMMAND_CATEGORY1 { + if category != *FIGHTER_PAD_COMMAND_CATEGORY1 { return; } diff --git a/src/training/tech.rs b/src/training/tech.rs index 14526cf..5946ba0 100644 --- a/src/training/tech.rs +++ b/src/training/tech.rs @@ -42,8 +42,8 @@ unsafe fn mod_handle_change_status( .unwrap_or(*FIGHTER_STATUS_KIND_WAIT as u64) as i32; // Ground Tech - if status_kind_int == FIGHTER_STATUS_KIND_DOWN - || status_kind_int == FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D + if status_kind_int == *FIGHTER_STATUS_KIND_DOWN + || status_kind_int == *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_D { let state: TechFlags = MENU.tech_state.get_random(); @@ -71,8 +71,8 @@ unsafe fn mod_handle_change_status( } // Wall Tech - if status_kind_int == FIGHTER_STATUS_KIND_STOP_WALL - || status_kind_int == FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR + if status_kind_int == *FIGHTER_STATUS_KIND_STOP_WALL + || status_kind_int == *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_LR { *status_kind = FIGHTER_STATUS_KIND_PASSIVE_WALL.as_lua_int(); *unk = LUA_TRUE; @@ -80,8 +80,8 @@ unsafe fn mod_handle_change_status( } // Ceiling Tech - if status_kind_int == FIGHTER_STATUS_KIND_STOP_CEIL - || status_kind_int == FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U + if status_kind_int == *FIGHTER_STATUS_KIND_STOP_CEIL + || status_kind_int == *FIGHTER_STATUS_KIND_DAMAGE_FLY_REFLECT_U { *status_kind = FIGHTER_STATUS_KIND_PASSIVE_CEIL.as_lua_int(); *unk = LUA_TRUE;