Enemy Territory

Project: Bug Fix

The objective

The goal of this project is to provide modders in the ET community with a SDK code base that contains fixes for various bugs which are present in the stock etmain game (version 2.60).

26th september 2006: Sadly bugfix 088 had a bug :-( There were 3 lines that should have been deleted for the fix to work correctly.

Show index
Previous bug: Player highlighting on the scoreboard was split into columns
Next bug: Background images on the loading screen are not always shown

Bugfix 078 - Medic, death and objective icons on the scoreboard are drawn too big

Problem:

Medic icon, objective and particularly the skull icon are drawn too big, resulting in them being drawn overlapping.

Solution:

Adjust their sizes and locations.

2.56 & 2.60 Code

cg_scoreboard.c @ 221 if ( ci->team != TEAM_SPECTATOR ) { if ( ci->powerups & ( (1 << PW_REDFLAG) | (1 << PW_BLUEFLAG) ) ) {
// CHRUKER: b078 - Medic, death and objective icons on the scoreboard are drawn too big CG_DrawPic( tempx - 3, y + 1, 14, 14, cgs.media.objectiveShader );
CG_DrawPic( tempx-4, y, 16, 16, cgs.media.objectiveShader );
offset += 14; // CHRUKER: b072 - Need to match tempx or else the other text gets offset tempx += 14; maxchars -= 2; } // draw the skull icon if out of lives if( score->respawnsLeft == -2 || (cgs.clientinfo[cg.clientNum].team != TEAM_SPECTATOR && ci->team == cgs.clientinfo[cg.clientNum].team && cgs.clientinfo[score->client].health == -1 ) ) {
// CHRUKER: b078 - Medic, death and objective icons on the scoreboard are drawn too big CG_DrawPic( tempx - 3, y + 1, 14, 14, cgs.media.scoreEliminatedShader );
CG_DrawPic( tempx, y, 18, 18, cgs.media.scoreEliminatedShader );
offset += 14; tempx += 14; maxchars -= 2; } else if( cgs.clientinfo[cg.clientNum].team != TEAM_SPECTATOR && ci->team == cgs.clientinfo[cg.clientNum].team && cgs.clientinfo[score->client].health == 0 ) {
// CHRUKER: b078 - Medic, death and objective icons on the scoreboard are drawn too big CG_DrawPic( tempx - 3, y + 1, 14, 14, cgs.media.medicIcon );
CG_DrawPic( tempx + 1, y + 1, 16, 16, cgs.media.medicIcon );
offset += 14; tempx += 14; maxchars -= 2; }
cg_scoreboard.c @ 354 if ( ci->powerups & ( (1 << PW_REDFLAG) | (1 << PW_BLUEFLAG) ) ) { // CHRUKER: b071 - Objective carrier icon missing on compact scoreboard
// CHRUKER: b078 - Medic, death and objective icons on the scoreboard are drawn too big CG_DrawPic( tempx - 1, y + 1, 10, 10, cgs.media.objectiveShader );
CG_DrawPic( tempx + 1, y + 1, 10, 10, cgs.media.objectiveShader );
offset += 10; tempx += 10; maxchars -= 2; } // draw the skull icon if out of lives if ( score->respawnsLeft == -2 || ( cgs.clientinfo[cg.clientNum].team != TEAM_SPECTATOR && ci->team == cgs.clientinfo[cg.clientNum].team && cgs.clientinfo[score->client].health == -1 ) ) {
// CHRUKER: b078 - Medic, death and objective icons on the scoreboard are drawn too big CG_DrawPic( tempx - 1, y + 1, 10, 10, cgs.media.scoreEliminatedShader );
CG_DrawPic( tempx, y, 12, 12, cgs.media.scoreEliminatedShader );
offset += 10; tempx += 10; maxchars -= 2; } else if( cgs.clientinfo[cg.clientNum].team != TEAM_SPECTATOR && ci->team == cgs.clientinfo[cg.clientNum].team && cgs.clientinfo[score->client].health == 0 ) {
// CHRUKER: b078 - Medic, death and objective icons on the scoreboard are drawn too big CG_DrawPic( tempx - 1, y + 1, 10, 10, cgs.media.medicIcon );
CG_DrawPic( tempx + 1, y + 1, 10, 10, cgs.media.medicIcon );
offset += 10; tempx += 10; maxchars -= 2; }

Show index
Previous bug: Player highlighting on the scoreboard was split into columns
Next bug: Background images on the loading screen are not always shown

Color coding

Sample = New code
Sample = Changed code (the new version is what is displayed)
Sample = Deleted code

©2017 Chruker