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: Show connecting people as connecting in the scoreboard and not as spectators
Next bug: Compact scoreboard - Medals not showing up

Bugfix 032 - Medals clipped wrong in scoreboard when you're dead

Problem:

When you die and has the wounded/death icon by your name in the scoreboard. If your name is so long that the medal string should be displayed it is still displayed and overlaps that XP, ping and lives columns.

Solution:

The problem is that CG_DrawStringExt would draw the entire string if maxchars is less than or equal to 0. So now we just check for a positive maxchars value before calling it.

Notes:

The bug is still present in version 2.60

2.56 & 2.60 Code

cg_scoreboard.c @ 281 } maxchars--;
// CHRUKER: b032 - Medals clipped wrong in scoreboard when you're dead, because CG_DrawStringExt will draw // everything if maxchars <= 0 if (maxchars > 0)
CG_DrawStringExt( tempx + (BG_drawStrlen(ci->name) * SMALLCHAR_WIDTH + SMALLCHAR_WIDTH), y, buf, hcolor, qfalse, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, maxchars ); tempx += INFO_PLAYER_WIDTH - offset;

Show index
Previous bug: Show connecting people as connecting in the scoreboard and not as spectators
Next bug: Compact scoreboard - Medals not showing up

Color coding

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

©2017 Chruker