fixed hud and flag icon position

This commit is contained in:
P3rlE 2022-03-07 23:15:00 +01:00
parent 808b51a099
commit d8f9599427
3 changed files with 23 additions and 107 deletions

View file

@ -786,15 +786,15 @@ static void CG_DrawRallyStatusBar( void ) {
// draw ammo background // draw ammo background
value = ps->ammo[cent->currentState.weapon]; value = ps->ammo[cent->currentState.weapon];
if ( value > -1 ) if ( value > -1 )
CG_FillRect( 4, 476 - 32, 106, 32, bg_color ); CG_FillRect( -20, 476 - 32, 106, 32, bg_color );
// health background
CG_FillRect( 106, 476 - 32, 106, 32, bg_color );
// armor background // armor background
if ( ps->stats[ STAT_ARMOR ] ) if ( ps->stats[ STAT_ARMOR ] )
// CG_FillRect( 190, 476 - 68, 106, 32, bg_color );
CG_FillRect( 256, 476 - 32, 106, 32, bg_color );
// health background CG_FillRect( 232, 476 - 32, 106, 32, bg_color );
CG_FillRect( 130, 476 - 32, 106, 32, bg_color );
// rearammo background // rearammo background
weapon = 0; weapon = 0;
@ -808,7 +808,7 @@ static void CG_DrawRallyStatusBar( void ) {
} }
if ( weapon ) if ( weapon )
CG_FillRect( 4, 476 - 68, 106, 32, bg_color ); CG_FillRect( 358, 476 - 32, 106, 32, bg_color );
// draw any 3D icons now, so the changes back to 2D are minimized // draw any 3D icons now, so the changes back to 2D are minimized
if ( cent->currentState.weapon && cg_weapons[ cent->currentState.weapon ].ammoModel ) { if ( cent->currentState.weapon && cg_weapons[ cent->currentState.weapon ].ammoModel ) {
@ -816,7 +816,7 @@ static void CG_DrawRallyStatusBar( void ) {
origin[1] = 0; origin[1] = 0;
origin[2] = 0; origin[2] = 0;
angles[YAW] = 270 * sin( cg.time / 1000.0 ); angles[YAW] = 270 * sin( cg.time / 1000.0 );
CG_Draw3DModel( 10, 476 - 28, 26, 26, CG_Draw3DModel( -14, 476 - 28, 26, 26,
cg_weapons[ cent->currentState.weapon ].ammoModel, 0, origin, angles ); cg_weapons[ cent->currentState.weapon ].ammoModel, 0, origin, angles );
} }
@ -834,18 +834,18 @@ static void CG_DrawRallyStatusBar( void ) {
origin[1] = 0; origin[1] = 0;
origin[2] = 0; origin[2] = 0;
angles[YAW] = 270 * sin( cg.time / 1000.0 ); angles[YAW] = 270 * sin( cg.time / 1000.0 );
CG_Draw3DModel( 136, 476 - 28, 26, 26, CG_Draw3DModel( 112, 476 - 28, 26, 26,
healthModel, 0, origin, angles ); healthModel, 0, origin, angles );
} }
if (cg.predictedPlayerState.powerups[PW_REDFLAG]) if (cg.predictedPlayerState.powerups[PW_REDFLAG])
CG_DrawStatusBarFlag( 196 + 26, TEAM_RED); CG_DrawStatusBarFlag( -70, TEAM_RED);
else if (cg.predictedPlayerState.powerups[PW_BLUEFLAG]) else if (cg.predictedPlayerState.powerups[PW_BLUEFLAG])
CG_DrawStatusBarFlag( 196 + 26, TEAM_BLUE); CG_DrawStatusBarFlag( -70, TEAM_BLUE);
else if (cg_entities[cg.snap->ps.clientNum].finishRaceTime && else if (cg_entities[cg.snap->ps.clientNum].finishRaceTime &&
cg_entities[cg.snap->ps.clientNum].currentPosition == 1){ cg_entities[cg.snap->ps.clientNum].currentPosition == 1){
CG_DrawStatusBarFlag( 196 + 26, -1); CG_DrawStatusBarFlag( -70, -1);
} }
if ( ps->stats[ STAT_ARMOR ] ) { if ( ps->stats[ STAT_ARMOR ] ) {
@ -854,7 +854,7 @@ static void CG_DrawRallyStatusBar( void ) {
origin[2] = -10; origin[2] = -10;
angles[YAW] = 270 * sin( cg.time / 1000.0 ); angles[YAW] = 270 * sin( cg.time / 1000.0 );
// CG_Draw3DModel( 196, 476 - 64, 26, 26, // CG_Draw3DModel( 196, 476 - 64, 26, 26,
CG_Draw3DModel( 262, 476 - 28, 26, 26, CG_Draw3DModel( 238, 476 - 28, 26, 26,
cgs.media.armorModel, 0, origin, angles ); cgs.media.armorModel, 0, origin, angles );
} }
@ -882,7 +882,7 @@ static void CG_DrawRallyStatusBar( void ) {
} }
trap_R_SetColor( colors[color] ); trap_R_SetColor( colors[color] );
CG_DrawField (52, 476 - 28, 3, value); CG_DrawField (28, 476 - 28, 3, value);
trap_R_SetColor( NULL ); trap_R_SetColor( NULL );
// if we didn't draw a 3D icon, draw a 2D icon for ammo // if we didn't draw a 3D icon, draw a 2D icon for ammo
@ -906,7 +906,7 @@ static void CG_DrawRallyStatusBar( void ) {
origin[1] = 0; origin[1] = 0;
origin[2] = 0; origin[2] = 0;
angles[YAW] = 270 * sin( cg.time / 1000.0 ); angles[YAW] = 270 * sin( cg.time / 1000.0 );
CG_Draw3DModel( 10, 476 - 64, 26, 26, CG_Draw3DModel( 364, 476 - 32, 26, 26,
cg_weapons[ weapon ].weaponModel, 0, origin, angles ); cg_weapons[ weapon ].weaponModel, 0, origin, angles );
} }
@ -926,7 +926,7 @@ static void CG_DrawRallyStatusBar( void ) {
} }
trap_R_SetColor( colors[color] ); trap_R_SetColor( colors[color] );
CG_DrawField (52 + CHAR_WIDTH, 476 - 64, 2, value); CG_DrawField (422, 476 - 28, 2, value);
trap_R_SetColor( NULL ); trap_R_SetColor( NULL );
// if we didn't draw a 3D icon, draw a 2D icon for ammo // if we didn't draw a 3D icon, draw a 2D icon for ammo
@ -958,7 +958,7 @@ static void CG_DrawRallyStatusBar( void ) {
} }
// stretch the health up when taking damage // stretch the health up when taking damage
CG_DrawField ( 178, 476 - 28, 3, value); CG_DrawField ( 154, 476 - 28, 3, value);
CG_ColorForHealth( hcolor ); CG_ColorForHealth( hcolor );
trap_R_SetColor( hcolor ); trap_R_SetColor( hcolor );
@ -970,7 +970,7 @@ static void CG_DrawRallyStatusBar( void ) {
if (value > 0 ) { if (value > 0 ) {
trap_R_SetColor( colors[0] ); trap_R_SetColor( colors[0] );
// CG_DrawField ( 242, 476 - 64, 3, value); // CG_DrawField ( 242, 476 - 64, 3, value);
CG_DrawField ( 304, 476 - 28, 3, value); CG_DrawField ( 280, 476 - 28, 3, value);
trap_R_SetColor( NULL ); trap_R_SetColor( NULL );
// if we didn't draw a 3D icon, draw a 2D icon for armor // if we didn't draw a 3D icon, draw a 2D icon for armor
if ( !cg_draw3dIcons.integer && cg_drawIcons.integer ) { if ( !cg_draw3dIcons.integer && cg_drawIcons.integer ) {
@ -1796,7 +1796,7 @@ static float CG_DrawRallyPowerups( float y ) {
CG_FillRect( x, y, 106, 32, bg_color ); CG_FillRect( x, y, 106, 32, bg_color );
trap_R_SetColor( colors[color] ); trap_R_SetColor( colors[color] );
CG_DrawField( x + 52 + CHAR_WIDTH, y + 3, 2, sortedTime[ i ] / 1000 ); CG_DrawField( x + 48 + CHAR_WIDTH, y + 3, 2, sortedTime[ i ] / 1000 );
t = ps->powerups[ sorted[i] ]; t = ps->powerups[ sorted[i] ];
if ( t - cg.time >= POWERUP_BLINKS * POWERUP_BLINK_TIME ) { if ( t - cg.time >= POWERUP_BLINKS * POWERUP_BLINK_TIME ) {

View file

@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define BASETA "missionpack" #define BASETA "missionpack"
#ifndef PRODUCT_VERSION #ifndef PRODUCT_VERSION
#define PRODUCT_VERSION "v0.4_r508" #define PRODUCT_VERSION "v0.4_r509"
#endif #endif

View file

@ -887,98 +887,14 @@ q3rallycode
engine\resync_svn.sh engine\resync_svn.sh
engine\cross-make-mingw64.sh engine\cross-make-mingw64.sh
[Open project files] [Open project files]
0=engine\code\client\cl_main.c 0=engine\code\qcommon\q_shared.h
1=engine\code\q3_ui\ui_video.c 1=engine\code\cgame\cg_draw.c
2=engine\code\qcommon\q_shared.c
3=engine\code\renderercommon\tr_common.h
4=engine\code\renderergl1\tr_backend.c
5=engine\code\renderergl1\tr_image.c
6=engine\code\renderergl1\tr_init.c
7=engine\code\renderergl1\tr_local.h
8=engine\code\renderergl1\tr_model_iqm.c
9=engine\code\cgame\cg_info.c
10=engine\code\cgame\cg_scoreboard.c
11=engine\code\cgame\cg_event.c
12=engine\code\cgame\cg_view.c
13=engine\code\qcommon\q_shared.h
14=engine\code\cgame\cg_weapons.c
15=engine\code\cgame\cg_drawtools.c
16=engine\code\cgame\cg_local.h
17=engine\code\ui\ui_main.c
18=engine\code\ui\ui_shared.c
19=engine\code\cgame\cg_draw.c
20=engine\code\cgame\cg_main.c
21=engine\code\ui\ui_shared.h
22=engine\code\cgame\cg_newdraw.c
[Selected Project Files] [Selected Project Files]
Main= Main=
Selected=engine\code\qcommon\q_shared.h Selected=engine\code\qcommon\q_shared.h
[engine\code\client\cl_main.c]
TopLine=3069
Caret=3,3108
[engine\code\q3_ui\ui_video.c]
TopLine=557
Caret=35,575
[engine\code\qcommon\q_shared.c]
TopLine=15
Caret=16,27
[engine\code\renderercommon\tr_common.h]
TopLine=63
Caret=34,83
[engine\code\renderergl1\tr_backend.c]
TopLine=782
Caret=103,797
[engine\code\renderergl1\tr_image.c]
TopLine=844
Caret=67,869
[engine\code\renderergl1\tr_init.c]
TopLine=1290
Caret=28,1298
[engine\code\renderergl1\tr_local.h]
TopLine=600
Caret=42,632
[engine\code\renderergl1\tr_model_iqm.c]
TopLine=157
Caret=29,182
[engine\code\cgame\cg_info.c]
TopLine=143
Caret=102,176
[engine\code\cgame\cg_scoreboard.c]
TopLine=404
Caret=1,435
[engine\code\cgame\cg_event.c]
TopLine=283
Caret=42,300
[engine\code\cgame\cg_view.c]
TopLine=522
Caret=3,552
[engine\code\qcommon\q_shared.h] [engine\code\qcommon\q_shared.h]
TopLine=49 TopLine=49
Caret=35,70 Caret=35,70
[engine\code\cgame\cg_weapons.c]
TopLine=1607
Caret=110,1632
[engine\code\cgame\cg_drawtools.c]
TopLine=95
Caret=1,129
[engine\code\cgame\cg_local.h]
TopLine=1608
Caret=1,1623
[engine\code\ui\ui_main.c]
TopLine=5130
Caret=40,5154
[engine\code\ui\ui_shared.c]
TopLine=322
Caret=41,343
[engine\code\cgame\cg_draw.c] [engine\code\cgame\cg_draw.c]
TopLine=2087 TopLine=1788
Caret=10,2108 Caret=23,1799
[engine\code\cgame\cg_main.c]
TopLine=295
Caret=33,317
[engine\code\ui\ui_shared.h]
TopLine=364
Caret=5,389
[engine\code\cgame\cg_newdraw.c]
TopLine=1145
Caret=1,1160