From c73f893280d1d319a2ab0ba0862e8ccc8ac64c3c Mon Sep 17 00:00:00 2001 From: q3rally Date: Tue, 28 Sep 2021 21:05:40 +0000 Subject: [PATCH] fixed rear view mirror bug where the mirror disappears sometimes --- engine/code/cgame/cg_draw.c | 15 ++++++--------- engine/code/cgame/cg_rally_hud.c | 8 ++++++-- engine/code/q3_ui/ui_rally_gfxloading.c | 8 ++++---- q3rallycode.ppr | 16 ++++++++++------ 4 files changed, 26 insertions(+), 21 deletions(-) diff --git a/engine/code/cgame/cg_draw.c b/engine/code/cgame/cg_draw.c index ef2a1a49..e5e72ceb 100644 --- a/engine/code/cgame/cg_draw.c +++ b/engine/code/cgame/cg_draw.c @@ -568,7 +568,6 @@ void CG_DrawSigilHUD( void ) { /* ================ CG_DrawStatusBar - ================ */ #ifndef MISSIONPACK @@ -706,10 +705,9 @@ static void CG_DrawStatusBar( void ) { /* -================ +===================== CG_DrawRallyStatusBar - -================ +===================== */ static void CG_DrawRallyStatusBar( void ) { int color; @@ -975,7 +973,6 @@ static void CG_DrawRallyStatusBar( void ) { /* ================ CG_DrawAttacker - ================ */ static float CG_DrawAttacker( float y ) { @@ -1030,9 +1027,9 @@ static float CG_DrawAttacker( float y ) { } /* -================== +=============== CG_DrawSnapshot -================== +=============== */ static float CG_DrawSnapshot( float y ) { char *s; @@ -1048,9 +1045,9 @@ static float CG_DrawSnapshot( float y ) { } /* -================== +========== CG_DrawFPS -================== +========== */ #define FPS_FRAMES 4 static float CG_DrawFPS( float y ) { diff --git a/engine/code/cgame/cg_rally_hud.c b/engine/code/cgame/cg_rally_hud.c index 12771303..cff78c99 100644 --- a/engine/code/cgame/cg_rally_hud.c +++ b/engine/code/cgame/cg_rally_hud.c @@ -26,9 +26,9 @@ CG_DrawRearviewMirror ===================== */ void CG_DrawRearviewMirror( float x, float y, float w, float h) { - static int lastLowFPSTime; +// static int lastLowFPSTime; int i; - int fps; +// int fps; float mx, my, mw, mh; int tmp; @@ -40,6 +40,8 @@ void CG_DrawRearviewMirror( float x, float y, float w, float h) { if (cgs.clientinfo[cg.snap->ps.clientNum].team == TEAM_SPECTATOR) return; + +/* if (cg_fpsLimit.integer >= 100) return; @@ -59,6 +61,8 @@ void CG_DrawRearviewMirror( float x, float y, float w, float h) { return; } } + +*/ mx = x - 8; my = y - 7; diff --git a/engine/code/q3_ui/ui_rally_gfxloading.c b/engine/code/q3_ui/ui_rally_gfxloading.c index a5eb8e92..03d18325 100644 --- a/engine/code/q3_ui/ui_rally_gfxloading.c +++ b/engine/code/q3_ui/ui_rally_gfxloading.c @@ -35,9 +35,9 @@ static gfxloading_t s_gfxloading; /* -=============== +============================ UI_GFX_Loading_HandleCaching -=============== +============================ */ #define NUM_OF_CACHES 7 static void UI_GFX_Loading_HandleCaching( void ) { @@ -103,9 +103,9 @@ static void UI_GFX_Loading_HandleCaching( void ) { /* -=============== +======================= UI_GFX_Loading_MenuDraw -=============== +======================= */ static void UI_GFX_Loading_MenuDraw( void ) { Menu_Draw( &s_gfxloading.menu ); diff --git a/q3rallycode.ppr b/q3rallycode.ppr index 07481f9c..e84ee411 100644 --- a/q3rallycode.ppr +++ b/q3rallycode.ppr @@ -454,7 +454,7 @@ q3rallycode engine\code\null\null_main.c engine\code\null\null_net.c engine\code\null\null_snddma.c - -q3_ui + +q3_ui engine\code\q3_ui\ui.def engine\code\q3_ui\ui_addbots.c engine\code\q3_ui\ui_atoms.c @@ -892,15 +892,16 @@ q3rallycode 4=engine\code\cgame\cg_main.c 5=engine\code\cgame\cg_draw.c 6=engine\code\cgame\cg_newdraw.c +7=engine\code\q3_ui\ui_rally_gfxloading.c [Selected Project Files] Main= -Selected=engine\code\cgame\cg_draw.c +Selected=engine\code\cgame\cg_rally_hud.c [engine\code\qcommon\q_shared.h] TopLine=57 Caret=36,70 [engine\code\cgame\cg_rally_hud.c] -TopLine=929 -Caret=1,755 +TopLine=44 +Caret=1,45 [engine\code\cgame\cg_rally_hud2.c] TopLine=1 Caret=1,1 @@ -911,8 +912,11 @@ Caret=1,1677 TopLine=348 Caret=35,364 [engine\code\cgame\cg_draw.c] -TopLine=798 -Caret=17,815 +TopLine=3369 +Caret=1,3385 [engine\code\cgame\cg_newdraw.c] TopLine=524 Caret=1,540 +[engine\code\q3_ui\ui_rally_gfxloading.c] +TopLine=99 +Caret=24,108