mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Don't draw crosshair 0 in Team Arena setup menu
Don't draw crosshair 0 in Team Arena setup menu. It isn't drawn in CGame. Wrap cg_drawCrosshair in missionpack menu like CGame instead of treating as index 0 which is no longer drawn.
This commit is contained in:
parent
e152761c28
commit
8192f66b39
1 changed files with 7 additions and 4 deletions
|
@ -1777,10 +1777,10 @@ static void UI_DrawRedBlue(rectDef_t *rect, float scale, vec4_t color, int textS
|
|||
}
|
||||
|
||||
static void UI_DrawCrosshair(rectDef_t *rect, float scale, vec4_t color) {
|
||||
trap_R_SetColor( color );
|
||||
if (uiInfo.currentCrosshair < 0 || uiInfo.currentCrosshair >= NUM_CROSSHAIRS) {
|
||||
uiInfo.currentCrosshair = 0;
|
||||
if (!uiInfo.currentCrosshair) {
|
||||
return;
|
||||
}
|
||||
trap_R_SetColor( color );
|
||||
UI_DrawHandlePic( rect->x, rect->y - rect->h, rect->w, rect->h, uiInfo.uiDC.Assets.crosshairShader[uiInfo.currentCrosshair]);
|
||||
trap_R_SetColor( NULL );
|
||||
}
|
||||
|
@ -5192,7 +5192,10 @@ void _UI_Init( qboolean inGameLoad ) {
|
|||
|
||||
// sets defaults for ui temp cvars
|
||||
uiInfo.effectsColor = gamecodetoui[(int)trap_Cvar_VariableValue("color1")-1];
|
||||
uiInfo.currentCrosshair = (int)trap_Cvar_VariableValue("cg_drawCrosshair");
|
||||
uiInfo.currentCrosshair = (int)trap_Cvar_VariableValue("cg_drawCrosshair") % NUM_CROSSHAIRS;
|
||||
if (uiInfo.currentCrosshair < 0) {
|
||||
uiInfo.currentCrosshair = 0;
|
||||
}
|
||||
trap_Cvar_Set("ui_mousePitch", (trap_Cvar_VariableValue("m_pitch") >= 0) ? "0" : "1");
|
||||
|
||||
uiInfo.serverStatus.currentServerCinematic = -1;
|
||||
|
|
Loading…
Reference in a new issue