From e8de4d00a02042d577e96efbde242f796546a1c9 Mon Sep 17 00:00:00 2001 From: P3rlE <97919909+P3rlE@users.noreply.github.com> Date: Wed, 2 Mar 2022 17:14:45 +0100 Subject: [PATCH] Fixed Hud Hopefully the last commit for 0.4 --- engine/code/cgame/cg_rally_hud.c | 26 +++++++++++++------------- q3rallycode.ppr | 8 ++++++-- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/engine/code/cgame/cg_rally_hud.c b/engine/code/cgame/cg_rally_hud.c index 1978d03f..f24f8f08 100644 --- a/engine/code/cgame/cg_rally_hud.c +++ b/engine/code/cgame/cg_rally_hud.c @@ -422,9 +422,9 @@ static float CG_DrawTimes( float y ) { Com_sprintf(s, sizeof(s), "B: %s", time); // x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH; - x = 636 - 120; - CG_FillRect ( x, y, 120, 18, bgColor ); - x+= 25; + x = 636 - 80; + CG_FillRect ( x, y, 90, 18, bgColor ); + x+= 10; y+= 4; CG_DrawTinyDigitalStringColor( x, y, s, colorWhite); y += TINYCHAR_HEIGHT + 4; @@ -441,9 +441,9 @@ static float CG_DrawTimes( float y ) { Com_sprintf(s, sizeof(s), "L: %s", time); // x = 600 - CG_DrawStrlen(s) * TINYCHAR_WIDTH; - x = 636 - 120; - CG_FillRect( x, y, 120, 18, bgColor ); - x+= 25; + x = 636 - 80; + CG_FillRect( x, y, 90, 18, bgColor ); + x+= 10; y+= 4; CG_DrawTinyDigitalStringColor( x, y, s, colorWhite); y += TINYCHAR_HEIGHT + 4; @@ -467,9 +467,9 @@ static float CG_DrawTimes( float y ) { Com_sprintf(s, sizeof(s), "T: %s", time); - x = 636 - 120; - CG_FillRect( x, y, 120, 18, bgColor ); - x += 25; + x = 636 - 80; + CG_FillRect( x, y, 90, 18, bgColor ); + x += 10; y += 4; CG_DrawTinyDigitalStringColor( x, y, s, colorWhite); y += TINYCHAR_HEIGHT + 4; @@ -501,9 +501,9 @@ static float CG_DrawLaps( float y ) { Com_sprintf(s, sizeof(s), "LAP: %i/%i", curLap, numLaps); - x = 636 - 120; - CG_FillRect( x, y, 120, 18, bgColor ); - x += 25; + x = 636 - 80; + CG_FillRect( x, y, 90, 18, bgColor ); + x += 10; y += 4; CG_DrawTinyDigitalStringColor( x, y, s, colorWhite); y += TINYCHAR_HEIGHT + 4; @@ -547,7 +547,7 @@ static float CG_DrawCurrentPosition( float y ) { CG_DrawTinyDigitalStringColor( x, y, va("%i/%i", pos, cgs.numRacers), colorWhite); - y += 10 + 4; + y += 20; return y; } diff --git a/q3rallycode.ppr b/q3rallycode.ppr index 51c33d6f..3c056102 100644 --- a/q3rallycode.ppr +++ b/q3rallycode.ppr @@ -892,12 +892,13 @@ q3rallycode 4=engine\code\cgame\cg_players.c 5=engine\code\cgame\cg_draw.c 6=engine\code\game\bg_public.h +7=engine\code\cgame\cg_rally_hud.c [Selected Project Files] Main= -Selected=engine\code\qcommon\q_shared.h +Selected=engine\code\cgame\cg_rally_hud.c [engine\code\qcommon\q_shared.h] TopLine=58 -Caret=35,70 +Caret=31,70 [engine\code\cgame\cg_ents.c] TopLine=144 Caret=1,160 @@ -916,3 +917,6 @@ Caret=1,336 [engine\code\game\bg_public.h] TopLine=390 Caret=3,408 +[engine\code\cgame\cg_rally_hud.c] +TopLine=532 +Caret=9,550