Do not draw weapon model, crosshair and hud in menu screen

This commit is contained in:
Petr Bartos 2022-09-29 17:41:20 +02:00
parent 96b1071b50
commit 21fc40dc44
2 changed files with 5 additions and 5 deletions

View file

@ -2824,7 +2824,7 @@ void CG_DrawActive( void ) {
// clear around the rendered view if sized down
CG_TileClear();
if(!vr->weapon_zoomed)
if(!vr->weapon_zoomed && !vr->virtual_screen)
CG_DrawCrosshair3D();
// offset vieworg appropriately if we're doing stereo separation
@ -2892,7 +2892,7 @@ void CG_DrawActive( void ) {
}
//Now draw the HUD shader in the world
if (trap_Cvar_VariableValue("vr_hudDrawStatus") != 2.0f)
if (trap_Cvar_VariableValue("vr_hudDrawStatus") != 2.0f && !vr->weapon_zoomed && !vr->virtual_screen)
{
refEntity_t ent;
trace_t trace;
@ -2955,7 +2955,7 @@ void CG_DrawActive( void ) {
//Now draw the screen 2D stuff
CG_DrawScreen2D();
if (!vr->weapon_zoomed)
if (!vr->weapon_zoomed && !vr->virtual_screen)
{
cg.drawingHUD = qtrue;

View file

@ -1728,8 +1728,8 @@ void CG_AddViewWeapon( playerState_t *ps ) {
return;
}
if (vr->weapon_zoomed) {
return; // do not draw weapon model with enabled weapon scope
if (vr->weapon_zoomed || vr->virtual_screen) {
return; // do not draw weapon model with enabled weapon scope or when in menu
}
cent = &cg.predictedPlayerEntity; // &cg_entities[cg.snap->ps.clientNum];