File tree Expand file tree Collapse file tree 4 files changed +20
-1
lines changed
Sources/CryGame C++/Solution1/CryGame Expand file tree Collapse file tree 4 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1
1
!include " MUI2.nsh"
2
- !define VERSION ' 0.2.1 '
2
+ !define VERSION ' 0.2.2 '
3
3
4
4
Name " FarCry VR Mod"
5
5
Original file line number Diff line number Diff line change @@ -131,6 +131,10 @@ bool VRRenderer::ShouldRenderVR() const
131
131
if (m_pGame->AreBinocularsActive ())
132
132
return false ;
133
133
134
+ CPlayer *player = m_pGame->GetLocalPlayer ();
135
+ if (player && player->IsWeaponZoomActive ())
136
+ return false ;
137
+
134
138
return true ;
135
139
}
136
140
Original file line number Diff line number Diff line change @@ -441,6 +441,19 @@ bool CPlayer::Init()
441
441
return true ;
442
442
}
443
443
444
+ bool CPlayer::IsWeaponZoomActive () const
445
+ {
446
+ if (!m_stats.aiming || !GetSelectedWeapon ())
447
+ return false ;
448
+
449
+ string weaponName = GetSelectedWeapon ()->GetName ();
450
+ // we want to switch to 2D rendering mode for appropriate weapons
451
+ if (weaponName == " RL" || weaponName == " SniperRifle" || weaponName == " OICW" )
452
+ return true ;
453
+
454
+ return false ;
455
+ }
456
+
444
457
// ////////////////////////////////////////////////////////////////////
445
458
/* !Called by the entity when the angles are changed.
446
459
This notification is used to force the orientation of the player.
Original file line number Diff line number Diff line change @@ -366,6 +366,8 @@ enum eInVehiclestate
366
366
bool HasFlashLight () const { return m_stats.has_flashlight ; }
367
367
void GiveFlashLight ( bool on );
368
368
369
+ bool IsWeaponZoomActive () const ;
370
+
369
371
// interface IEntityContainer
370
372
371
373
virtual bool Init ();
You can’t perform that action at this time.
0 commit comments