Ensure roll is used when in scope

This commit is contained in:
Simon 2023-07-10 23:36:51 +01:00
parent bda2e7e3f1
commit d98a7aad7f
2 changed files with 2 additions and 2 deletions

View file

@ -2259,7 +2259,7 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
//Sniper/E11 scope //Sniper/E11 scope
if (usingScope) if (usingScope)
{ {
cg.refdef.viewangles[ROLL] = vr->clientviewangles[ROLL]; cg.refdef.viewangles[ROLL] = vr->hmdorientation[ROLL];
cg.refdef.viewangles[PITCH] = vr->weaponangles[ANGLES_ADJUSTED][PITCH]; cg.refdef.viewangles[PITCH] = vr->weaponangles[ANGLES_ADJUSTED][PITCH];
cg.refdef.viewangles[YAW] = vr->clientviewangles[YAW] cg.refdef.viewangles[YAW] = vr->clientviewangles[YAW]
+ vr->weaponangles[ANGLES_ADJUSTED][YAW] + SHORT2ANGLE(cg.snap->ps.delta_angles[YAW]); + vr->weaponangles[ANGLES_ADJUSTED][YAW] + SHORT2ANGLE(cg.snap->ps.delta_angles[YAW]);

View file

@ -3036,7 +3036,7 @@ void CG_DrawActive( stereoFrame_t stereoView ) {
//Sniper/E11 scope //Sniper/E11 scope
if (usingScope) if (usingScope)
{ {
cg.refdef.viewangles[ROLL] = vr->clientviewangles[ROLL]; cg.refdef.viewangles[ROLL] = vr->hmdorientation[ROLL];
cg.refdef.viewangles[PITCH] = vr->weaponangles[ANGLES_ADJUSTED][PITCH]; cg.refdef.viewangles[PITCH] = vr->weaponangles[ANGLES_ADJUSTED][PITCH];
cg.refdef.viewangles[YAW] = vr->clientviewangles[YAW] cg.refdef.viewangles[YAW] = vr->clientviewangles[YAW]
+ vr->weaponangles[ANGLES_ADJUSTED][YAW] + SHORT2ANGLE(cg.snap->ps.delta_angles[YAW]); + vr->weaponangles[ANGLES_ADJUSTED][YAW] + SHORT2ANGLE(cg.snap->ps.delta_angles[YAW]);