Thanks to Tig + lurker ! - Can anyone build a Q3-menu-patch ?
Started by BOCKWURST
avatar
BOCKWURST Rep. 238
#1   11 Jul 2022
A picture is worth a 1000 words, please download the screenshot, I have the explanatory text on the picture !
Maybe someone has a solution !?
drive.google.com/f...jzI-H8njhH/view
Edited 22.43 days after the original posting.
avatar
Tig Rep. 1224
#2   12 Jul 2022
Easy enough to do as a mod and might be possible as a patch file.

That status bar appears either blue or red in CTF matches, which is why it might be possible as a patch file.

avatar
lurker Rep. 10
#3   14 Jul 2022
Assuming we mean vQ3/baseq3, the short answer is: not possible in g_gametype 0,1,2 with unmodified vm/cgame.qvm .

More specifically, that bar is drawn by CG_DrawTeamBackground (in cgame/cg_draw.c, which compiles as part of /vm/cgame.qvm ). The function requires the player's team to be specifically TEAM_RED or TEAM_BLUE. In gametypes 0,1,2 the player is on TEAM_FREE or TEAM_SPECTATOR and cannot change to Blue or Red. (This is limited by the function SetTeam (in game/g_cmds.c, which compiles as part of /vm/qagame.qvm ). You cannot change to either Red or Blue team unless g_gametype >= 3.)

I don't have build tools on this machine, so I can't test this morning, but the following replacement function would set a grayscale bar when the player's team is not Red or Blue and the player is not a Spectator. Note that this is C, not Python, so LvL's killing of tabs doesn't matter.

void CG_DrawTeamBackground ( int x, int y, int w, int h, float alpha, int team )
{
vec4_t hcolor;
hcolor[3] = alpha;
if ( team == TEAM_FREE ) {
hcolor[0] = 0.5f;
hcolor[1] = 0.5f;
hcolor[2] = 0.5f;
} else if ( team == TEAM_RED ) {
hcolor[0] = 1;
hcolor[1] = 0;
hcolor[2] = 0;
} else if ( team == TEAM_BLUE ) {
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 1;
} else {
return;
}
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar );
trap_R_SetColor( NULL );
}
//end of CG_DrawTeamBackground

avatar
lurker Rep. 10
#4   24 days ago
www.mediafire.com/...d-r7teambar.zip
Modification of ZTM's Flexible HUD mod R7 for BOCKWURST. Install as you would the original. Note that if the .pk3 filename does not sort alphabetically later than the official .pk3, you'll need to temporarily remove the official release to make this work.
I tried to make the default bar match your screenshot. You can also use the following cvars to adjust it:
cg_teambarr [0 - 1] red component of the team bar in non-team modes. (default: 0)
cg_teambarg [0 - 1] green component (default: 0)
cg_teambarb [0 - 1] blue component (default: 0)
cg_teambara [0 - 1] alpha component (opacity) (default: 0.33)
(that is, the default is a black bar with 33% opacity.)

(Also: either thanks or apologies to Tig re: code formatting. :) )

avatar
BOCKWURST Rep. 238
#5   15 days ago
Thanks to Tig for the info !
Thanks to lurker for the special Bockwurst-ZTM-patch !
Man, that looks cool in the color green (grey too) ! lurker you have done a great job. For this many many thanks !

Only registered members can post a reply.
Already registered? Sign in.

kylemoredm1
Clear