From 7dcf020d87c6a7a1b34f3dfa712974f548f21e83 Mon Sep 17 00:00:00 2001 From: q3rally Date: Sun, 25 Apr 2021 20:46:11 +0000 Subject: [PATCH] fixed interface bug with overlapping icons --- engine/code/cgame/cg_draw.c | 13 +++++---- engine/code/cgame/cg_local.h | 2 +- engine/code/cgame/cg_rally_hud.c | 13 ++++++--- engine/code/cgame/cg_weapons.c | 1 + engine/code/qcommon/q_shared.h | 2 +- q3rallycode.ppr | 48 ++++++++++++++++++++++---------- 6 files changed, 54 insertions(+), 25 deletions(-) diff --git a/engine/code/cgame/cg_draw.c b/engine/code/cgame/cg_draw.c index 568051ff..220b04b4 100644 --- a/engine/code/cgame/cg_draw.c +++ b/engine/code/cgame/cg_draw.c @@ -617,7 +617,7 @@ static void CG_DrawStatusBar( void ) { origin[1] = 0; origin[2] = -10; angles[YAW] = ( cg.time & 2047 ) * 360 / 2048.0; - CG_Draw3DModel( 370 + CHAR_WIDTH*3 + TEXT_ICON_SPACE, 432, ICON_SIZE, ICON_SIZE, + CG_Draw3DModel( 370 + CHAR_WIDTH*3 + TEXT_ICON_SPACE, 432, ICON_SIZE, ICON_SIZE, cgs.media.armorModel, 0, origin, angles ); } // @@ -760,10 +760,11 @@ static void CG_DrawRallyStatusBar( void ) { // armor background if ( ps->stats[ STAT_ARMOR ] ) - CG_FillRect( 190, 476 - 68, 106, 32, bg_color ); +// CG_FillRect( 190, 476 - 68, 106, 32, bg_color ); + CG_FillRect( 370, 476 - 32, 106, 32, bg_color ); // health background - CG_FillRect( 190, 476 - 32, 106, 32, bg_color ); + CG_FillRect( 190, 476 - 32, 106, 32, bg_color ); // rearammo background weapon = 0; @@ -823,7 +824,8 @@ static void CG_DrawRallyStatusBar( void ) { origin[1] = 0; origin[2] = -10; angles[YAW] = ( cg.time & 2047 ) * 360 / 2048.0; - CG_Draw3DModel( 196, 476 - 64, 26, 26, +// CG_Draw3DModel( 196, 476 - 64, 26, 26, + CG_Draw3DModel( 376, 476 - 28, 26, 26, cgs.media.armorModel, 0, origin, angles ); } @@ -938,7 +940,8 @@ static void CG_DrawRallyStatusBar( void ) { value = ps->stats[STAT_ARMOR]; if (value > 0 ) { trap_R_SetColor( colors[0] ); - CG_DrawField ( 242, 476 - 64, 3, value); +// CG_DrawField ( 242, 476 - 64, 3, value); + CG_DrawField ( 422, 476 - 28, 3, value); trap_R_SetColor( NULL ); // if we didn't draw a 3D icon, draw a 2D icon for armor if ( !cg_draw3dIcons.integer && cg_drawIcons.integer ) { diff --git a/engine/code/cgame/cg_local.h b/engine/code/cgame/cg_local.h index 68a39c56..d59ef169 100644 --- a/engine/code/cgame/cg_local.h +++ b/engine/code/cgame/cg_local.h @@ -1952,7 +1952,7 @@ float CG_DrawUpperRightHUD( float y ); float CG_DrawLowerRightHUD( float y ); float CG_DrawLowerLeftHUD( float y ); void CG_DrawMMap( float x, float y, float w, float h ); -void CG_DrawHUD_DerbyList(float x, float y); +// void CG_DrawHUD_DerbyList(float x, float y); // diff --git a/engine/code/cgame/cg_rally_hud.c b/engine/code/cgame/cg_rally_hud.c index 05da692d..6e9624d8 100644 --- a/engine/code/cgame/cg_rally_hud.c +++ b/engine/code/cgame/cg_rally_hud.c @@ -354,8 +354,12 @@ static float CG_DrawArrowToCheckpoint( float y ) { } trap_R_SetColor( color ); -// if (cg_developer.integer) -// CG_Draw3DLine( cent->currentState.origin, cg.snap->ps.origin ); +/* Developer Mode for Racing Bots + + if (cg_developer.integer) + CG_Draw3DLine( cent->currentState.origin, cg.snap->ps.origin ); + +*/ CG_DrawStringExt( x, SCREEN_HEIGHT * .30, "WRONG WAY!", color, qfalse, qtrue, BIGCHAR_WIDTH, (int)(BIGCHAR_WIDTH * 1.5), 0 ); @@ -812,6 +816,7 @@ static float CG_DrawSpeed( float y ) { return y; } +/* static float CG_DrawSDKMessage( float y ) { int x, w; vec4_t bg_color; @@ -859,7 +864,7 @@ static float CG_DrawSDKMessage( float y ) { return y; } - +*/ #if 0 /* @@ -912,7 +917,7 @@ float CG_DrawUpperRightHUD( float y ) { } else if (cgs.gametype == GT_DERBY) y = CG_DrawTimes( y ); - CG_DrawHUD_DerbyList(44, 130); +// CG_DrawHUD_DerbyList(44, 130); } diff --git a/engine/code/cgame/cg_weapons.c b/engine/code/cgame/cg_weapons.c index ea5b5be9..9249690c 100644 --- a/engine/code/cgame/cg_weapons.c +++ b/engine/code/cgame/cg_weapons.c @@ -718,6 +718,7 @@ void CG_RegisterWeapon( int weaponNum ) { weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/flamer/fl_fire.wav", qfalse ); cgs.media.flameExplosionShader = trap_R_RegisterShader( "rocketExplosion" ); break; + // Q3Rally Code END #ifdef MISSIONPACK diff --git a/engine/code/qcommon/q_shared.h b/engine/code/qcommon/q_shared.h index 6b04f22e..bffc9fb8 100644 --- a/engine/code/qcommon/q_shared.h +++ b/engine/code/qcommon/q_shared.h @@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define BASETA "missionpack" #ifndef PRODUCT_VERSION -#define PRODUCT_VERSION "v0.0.3.0_r383" +#define PRODUCT_VERSION "v0.0.3.0_r385" #endif diff --git a/q3rallycode.ppr b/q3rallycode.ppr index 870b0916..5372f478 100644 --- a/q3rallycode.ppr +++ b/q3rallycode.ppr @@ -95,7 +95,7 @@ q3rallycode engine\code\botlib\l_utils.h engine\code\botlib\lcc.mak engine\code\botlib\linux-i386.mak - -cgame + +cgame engine\code\cgame\cg_atmospheric.c engine\code\cgame\cg_consolecmds.c engine\code\cgame\cg_draw.c @@ -869,9 +869,14 @@ q3rallycode 8=engine\code\game\g_weapon.c 9=engine\code\game\g_local.h 10=engine\code\cgame\cg_weapons.c +11=engine\code\game\bg_misc.c +12=engine\code\game\bg_public.h +13=engine\code\game\g_items.c +14=engine\code\cgame\cg_effects.c +15=engine\code\cgame\cg_main.c [Selected Project Files] Main= -Selected=engine\code\cgame\cg_weapons.c +Selected=engine\code\qcommon\q_shared.h [engine\code\qcommon\q_shared.h] TopLine=53 Caret=39,70 @@ -882,20 +887,20 @@ Caret=1,2287 TopLine=477 Caret=1,492 [engine\code\cgame\cg_ents.c] -TopLine=1390 -Caret=1,1405 +TopLine=517 +Caret=1,532 [engine\code\cgame\cg_rally_hud.c] -TopLine=931 -Caret=1,955 +TopLine=1 +Caret=3,819 [engine\code\cgame\cg_rally_hud2.c] -TopLine=361 -Caret=19,361 +TopLine=1 +Caret=126,75 [engine\code\cgame\cg_draw.c] -TopLine=1280 -Caret=1,1295 +TopLine=930 +Caret=26,944 [engine\code\cgame\cg_local.h] -TopLine=1885 -Caret=1,1900 +TopLine=1940 +Caret=4,1955 [engine\code\game\g_weapon.c] TopLine=128 Caret=16,146 @@ -903,5 +908,20 @@ Caret=16,146 TopLine=637 Caret=1,652 [engine\code\cgame\cg_weapons.c] -TopLine=701 -Caret=64,716 +TopLine=2011 +Caret=32,2032 +[engine\code\game\bg_misc.c] +TopLine=65 +Caret=11,89 +[engine\code\game\bg_public.h] +TopLine=808 +Caret=1,823 +[engine\code\game\g_items.c] +TopLine=486 +Caret=1,501 +[engine\code\cgame\cg_effects.c] +TopLine=612 +Caret=1,627 +[engine\code\cgame\cg_main.c] +TopLine=892 +Caret=84,907