Skip to content

Commit 7e4fb2c

Browse files
committed
Use viewpos instead of player pos for determining build menu auto close
1 parent fb96860 commit 7e4fb2c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

code/cgame/cg_q3f_menu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,10 +1049,10 @@ void CG_Q3F_DrawMenuBox(void) {
10491049
vec3_t to_menu;
10501050
float a;
10511051
AngleVectors(cg.refdefViewAngles, fwd, NULL, NULL);
1052-
VectorSubtract(menulocation, cg_entities[cg.snap->ps.clientNum].lerpOrigin, to_menu);
1052+
VectorSubtract(menulocation, cg.refdef.vieworg, to_menu);
10531053
VectorNormalize(to_menu);
10541054
a = DotProduct( fwd, to_menu );
1055-
if( Distance( menulocation, cg_entities[cg.snap->ps.clientNum].lerpOrigin ) > menurange || a < 0.75f ) {
1055+
if( Distance( menulocation, cg.refdef.vieworg ) > menurange || a < 0.75f ) {
10561056
CG_Q3F_MenuCancel( qfalse );
10571057
}
10581058
}

0 commit comments

Comments
 (0)