@@ -115,8 +115,8 @@ static char* netnames[] = {
115115static char quake3worldMessage [] = "Visit www.quake3world.com - News, Community, Events, Files" ;
116116#endif
117117
118- static int gamecodetoui [] = {0 ,1 , 2 , 3 ,4 ,5 ,6 };
119- static int uitogamecode [] = {1 ,2 , 3 ,4 ,5 , 6 ,7 };
118+ static int gamecodetoui [] = {0 ,2 , 1 ,4 ,5 , 3 ,6 };
119+ static int uitogamecode [] = {1 ,3 , 2 , 6 ,4 ,5 ,7 };
120120
121121
122122static void UI_StartServerRefresh (qboolean full , qboolean force );
@@ -1296,9 +1296,10 @@ static void UI_DrawEffects(rectDef_t *rect, float scale, vec4_t color) {
12961296 static int gamecodetofxpic [] = {0 ,2 ,1 ,4 ,5 ,3 ,6 };
12971297 int gameColorCode = uitogamecode [uiInfo .effectsColor ];
12981298 int fxPicIndex = gamecodetofxpic [gameColorCode - 1 ];
1299+ int markerX = rect -> x + (uiInfo .effectsColor * 112 / 6 );
12991300
13001301 UI_DrawHandlePic ( rect -> x , rect -> y - 14 , 128 , 8 , uiInfo .uiDC .Assets .fxBasePic );
1301- UI_DrawHandlePic ( rect -> x + uiInfo . effectsColor * 16 + 8 , rect -> y - 16 , 16 , 12 , uiInfo .uiDC .Assets .fxPic [fxPicIndex ] );
1302+ UI_DrawHandlePic ( markerX , rect -> y - 16 , 16 , 12 , uiInfo .uiDC .Assets .fxPic [fxPicIndex ] );
13021303}
13031304
13041305static void UI_DrawMapPreview (rectDef_t * rect , float scale , vec4_t color , qboolean net ) {
@@ -1911,9 +1912,10 @@ static void UI_DrawCrosshairColor(rectDef_t *rect, float scale, vec4_t color) {
19111912 }
19121913 int uiColorIndex = gamecodetoui [gameColorCode - 1 ];
19131914 int fxPicIndex = gamecodetofxpic [gameColorCode - 1 ];
1915+ int markerX = rect -> x + (uiColorIndex * 112 / 6 );
19141916
19151917 UI_DrawHandlePic ( rect -> x , rect -> y - 10 , 128 , 8 , uiInfo .uiDC .Assets .fxBasePic );
1916- UI_DrawHandlePic ( rect -> x + uiColorIndex * 16 + 8 , rect -> y - 12 , 16 , 12 , uiInfo .uiDC .Assets .fxPic [fxPicIndex ] );
1918+ UI_DrawHandlePic ( markerX , rect -> y - 12 , 16 , 12 , uiInfo .uiDC .Assets .fxPic [fxPicIndex ] );
19171919}
19181920
19191921/*
@@ -2744,13 +2746,15 @@ static qboolean UI_CrosshairColor_HandleKey(int flags, float *special, int key)
27442746 int select = UI_SelectForKey (key );
27452747 if (select != 0 ) {
27462748 int currentColor = (int )trap_Cvar_VariableValue ("cg_crosshairColor" );
2747- currentColor += select ;
2749+ int uiIndex = gamecodetoui [currentColor - 1 ];
2750+ uiIndex += select ;
27482751
2749- if (currentColor > 7 ) {
2750- currentColor = 1 ;
2751- } else if (currentColor < 1 ) {
2752- currentColor = 7 ;
2752+ if (uiIndex > 6 ) {
2753+ uiIndex = 0 ;
2754+ } else if (uiIndex < 0 ) {
2755+ uiIndex = 6 ;
27532756 }
2757+ currentColor = uitogamecode [uiIndex ];
27542758 trap_Cvar_SetValue ("cg_crosshairColor" , currentColor );
27552759 // Enable health-based coloring for white, disable for custom colors
27562760 if (currentColor == 7 ) {
0 commit comments