Well I’m working on this small mod with a new game mode. The score for each team is important in this game mode and is changed so the team only gets points when they accomplish this objective. So I thought I would add the team scores to the hud. That was easy just added some code like this:
static void CG_DrawTeamScore( void ) {
char *s1, *s2;
if ( cg_gameType.integer != GT_WOLF_PB )
return;
if ( cg_drawTeamScore.integer != 1 )
return;
CG_DrawTeamBackground( 520, 340, 60, 40, 0.5f, TEAM_AXIS );
CG_DrawTeamBackground( 580, 340, 60, 40, 0.5f, TEAM_ALLIES );
s1 = va("%i", cg.teamScores[TEAM_AXIS - TEAM_AXIS] );
s2 = va("%i", cg.teamScores[TEAM_ALLIES - TEAM_AXIS] );
CG_DrawStringExt( 530, 343, CG_TranslateString( s1 ), colorWhite, qfalse, qtrue, 15, 35, 0 );
CG_DrawStringExt( 590, 343, CG_TranslateString( s2 ), colorWhite, qfalse, qtrue, 15, 35, 0 );
}
And sure enough it draws on the hud, but it doesn’t update the score until I looked at the scoreboard. So I checked the code for the scoreboard to try and locate where it actually gets the update of the score but I just can’t find it. Maybe I’m just tired or something (it’s 4.30 am and I need to get up in just a few hours lol) but if anyone could help I would really apreciate it.