Skip to content

Commit

Permalink
Remove instances of screen shake from VR experience
Browse files Browse the repository at this point in the history
  • Loading branch information
fholger committed May 6, 2023
1 parent 74911ed commit 4e03f72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Code/Melee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,9 @@ void CMelee::Hit(ray_hit *hit, const Vec3 &dir, float damageScale, bool remote)
//-----------------------------------------------------------------------
void CMelee::ApplyCameraShake(bool hit)
{
// VR: don't want no screen shake
return;

// Add some camera shake for client even if not hitting
if(m_pWeapon->GetOwnerActor() && m_pWeapon->GetOwnerActor()->IsClient())
{
Expand Down
3 changes: 3 additions & 0 deletions Code/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3512,6 +3512,9 @@ void CPlayer::CameraShake(float angle,float shift,float duration,float frequency
{
float angleAmount(max(-90.0f,min(90.0f,angle)) * gf_PI/180.0f);
float shiftAmount(shift);

// VR: don't want angle shake
angleAmount = 0;

if (IVehicle* pVehicle = GetLinkedVehicle())
{
Expand Down

0 comments on commit 4e03f72

Please sign in to comment.