Skip to content

Commit

Permalink
Fix a potential crash while using the binoculars
Browse files Browse the repository at this point in the history
  • Loading branch information
fholger committed Jan 24, 2025
1 parent 910ab93 commit 1ebab31
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Code/VR/VRManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,12 @@ void VRManager::DetachOffHandFromWeapon()
return;

//weapon->SetCurrentZoomMode(0);
weapon->GetFireMode(weapon->GetCurrentFireMode())->ResetRecoilMod();
weapon->GetFireMode(weapon->GetCurrentFireMode())->ResetSpreadMod();
IFireMode* fm = weapon->GetFireMode(weapon->GetCurrentFireMode());
if (fm)
{
fm->ResetRecoilMod();
fm->ResetSpreadMod();
}
}

CPlayer* VRManager::GetLocalPlayer() const
Expand Down

0 comments on commit 1ebab31

Please sign in to comment.