Skip to content

Commit

Permalink
Add animation anm_open_empty [ci build] (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
xrSimpodin committed Jun 29, 2024
1 parent 7424283 commit a1c1b76
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ogsr_engine/xrGame/WeaponShotgun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,14 @@ void CWeaponShotgun::OnStateSwitch(u32 S, u32 oldState)
}
}
PlaySound(m_sndOpen, get_LastFP());
PlayHUDMotion({"anim_open_weapon", "anm_open"}, true, GetState());
if (GetAmmoElapsed() < 1 && AnimationExist("anm_open_empty"))
{
PlayHUDMotion({"anm_open_empty"}, true, GetState());
}
else
{
PlayHUDMotion({"anim_open_weapon", "anm_open"}, true, GetState());
}
SetPending(TRUE);
}
break;
Expand Down

0 comments on commit a1c1b76

Please sign in to comment.