Skip to content

Commit bd0d89e

Browse files
committed
fix flickering when returning to menu
1 parent c5fbd77 commit bd0d89e

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

L4D2VR/config.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ LeftHanded=false
55
VRScale=43.2
66
IPDScale=1.0
77
HideArms=false
8-
HudDistance=2.0
9-
HudSize=1.5
8+
HudDistance=1.3
9+
HudSize=1.1
1010
HudAlwaysVisible=false

L4D2VR/vr.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,11 @@ void VR::SubmitVRTextures()
200200
vr::VROverlay()->ShowOverlay(m_MainMenuHandle);
201201
vr::VROverlay()->HideOverlay(m_HUDHandle);
202202

203-
vr::VRCompositor()->Submit(vr::Eye_Left, &m_VKBlankTexture.m_VRTexture, NULL, vr::Submit_Default);
204-
vr::VRCompositor()->Submit(vr::Eye_Right, &m_VKBlankTexture.m_VRTexture, NULL, vr::Submit_Default);
203+
if (!m_Game->m_EngineClient->IsInGame())
204+
{
205+
vr::VRCompositor()->Submit(vr::Eye_Left, &m_VKBlankTexture.m_VRTexture, NULL, vr::Submit_Default);
206+
vr::VRCompositor()->Submit(vr::Eye_Right, &m_VKBlankTexture.m_VRTexture, NULL, vr::Submit_Default);
207+
}
205208

206209
return;
207210
}
@@ -835,6 +838,7 @@ void VR::UpdateTracking()
835838
m_RightControllerUp = VectorRotate(m_RightControllerUp, m_RightControllerRight, -45.0);
836839

837840
// controller angles
841+
QAngle::VectorAngles(m_LeftControllerForward, m_LeftControllerUp, m_LeftControllerAngAbs);
838842
QAngle::VectorAngles(m_RightControllerForward, m_RightControllerUp, m_RightControllerAngAbs);
839843

840844
PositionAngle viewmodelOffset = localPlayer->GetViewmodelOffset();

L4D2VR/vr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ class VR
179179
float m_VRScale = 43.2;
180180
float m_IpdScale = 1.0;
181181
bool m_HideArms = false;
182-
float m_HudDistance = 2.0;
183-
float m_HudSize = 1.5;
182+
float m_HudDistance = 1.3;
183+
float m_HudSize = 1.1;
184184
bool m_HudAlwaysVisible = false;
185185

186186
VR() {};

0 commit comments

Comments
 (0)