fix(NoRecoil): remove sniper scope recoil (#2168)
This commit is contained in:
parent
04cfa46d78
commit
639d776267
@ -9,7 +9,8 @@ namespace big
|
||||
using looped_command::looped_command;
|
||||
|
||||
CWeaponInfo* p_modified_weapon = nullptr;
|
||||
float og_recoil_value = 0.0f;
|
||||
uint32_t og_recoil_hash = 0;
|
||||
uint32_t og_recoil_hash_fp = 0;
|
||||
|
||||
virtual void on_tick() override
|
||||
{
|
||||
@ -24,14 +25,19 @@ namespace big
|
||||
if (p_modified_weapon != weapon_mgr->m_weapon_info)
|
||||
{
|
||||
if (p_modified_weapon)
|
||||
p_modified_weapon->m_recoil_shake_amplitude = og_recoil_value;
|
||||
{
|
||||
p_modified_weapon->m_recoil_shake_hash = og_recoil_hash;
|
||||
p_modified_weapon->m_recoil_shake_hash_first_person = og_recoil_hash_fp;
|
||||
}
|
||||
|
||||
p_modified_weapon = weapon_mgr->m_weapon_info;
|
||||
|
||||
if (weapon_mgr->m_weapon_info)
|
||||
{
|
||||
og_recoil_value = weapon_mgr->m_weapon_info->m_recoil_shake_amplitude;
|
||||
weapon_mgr->m_weapon_info->m_recoil_shake_amplitude = 0.0f;
|
||||
og_recoil_hash = weapon_mgr->m_weapon_info->m_recoil_shake_hash;
|
||||
og_recoil_hash_fp = weapon_mgr->m_weapon_info->m_recoil_shake_hash_first_person;
|
||||
weapon_mgr->m_weapon_info->m_recoil_shake_hash = 0;
|
||||
weapon_mgr->m_weapon_info->m_recoil_shake_hash_first_person = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -41,7 +47,8 @@ namespace big
|
||||
{
|
||||
if (g_local_player && p_modified_weapon)
|
||||
{
|
||||
p_modified_weapon->m_recoil_shake_amplitude = og_recoil_value;
|
||||
p_modified_weapon->m_recoil_shake_hash = og_recoil_hash;
|
||||
p_modified_weapon->m_recoil_shake_hash_first_person = og_recoil_hash_fp;
|
||||
p_modified_weapon = nullptr;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user