@@ -158,14 +158,15 @@ unsafe fn set_weapon_hitlag(ctx: &mut skyline::hooks::InlineCtx) {
158
158
#[ skyline:: hook( offset = 0x404658 , inline) ]
159
159
unsafe fn set_fighter_hitlag ( ctx : & mut skyline:: hooks:: InlineCtx ) {
160
160
let boma = & mut * ( * ctx. registers [ 19 ] . x . as_ref ( ) as * mut BattleObjectModuleAccessor ) ;
161
-
162
- let hitlag = * ctx. registers [ 0 ] . w . as_ref ( ) ;
163
- let kb = DamageModule :: reaction ( boma, 0 ) ;
164
- let max_hitlag = WorkModule :: get_param_float ( boma, hash40 ( "battle_object" ) , hash40 ( "hitstop_frame_max" ) ) ;
165
- let attr = * ( ( * ctx. registers [ 20 ] . x . as_ref ( ) + 0xb8 ) as * mut u64 ) ;
166
- if ![ hash40 ( "collision_attr_paralyze" ) , hash40 ( "collision_attr_saving" ) ] . contains ( & attr) {
167
- // Set hitlag for defender
168
- * ctx. registers [ 0 ] . w . as_mut ( ) = ( hitlag as f32 * ( 0.414 * std:: f32:: consts:: E . powf ( 0.0063 * kb) ) . clamp ( 1.0 , 2.0 ) ) . round ( ) . min ( max_hitlag) as u32 ;
161
+ if !boma. is_item ( ) {
162
+ let hitlag = * ctx. registers [ 0 ] . w . as_ref ( ) ;
163
+ let kb = DamageModule :: reaction ( boma, 0 ) ;
164
+ let max_hitlag = WorkModule :: get_param_float ( boma, hash40 ( "battle_object" ) , hash40 ( "hitstop_frame_max" ) ) ;
165
+ let attr = * ( ( * ctx. registers [ 20 ] . x . as_ref ( ) + 0xb8 ) as * mut u64 ) ;
166
+ if ![ hash40 ( "collision_attr_paralyze" ) , hash40 ( "collision_attr_saving" ) ] . contains ( & attr) {
167
+ // Set hitlag for defender
168
+ * ctx. registers [ 0 ] . w . as_mut ( ) = ( hitlag as f32 * ( 0.414 * std:: f32:: consts:: E . powf ( 0.0063 * kb) ) . clamp ( 1.0 , 2.0 ) ) . round ( ) . min ( max_hitlag) as u32 ;
169
+ }
169
170
}
170
171
IS_KB_CALC_EARLY = false ;
171
172
}
0 commit comments