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: During team switching you can sometime spawn immediately
Next bug: Improving script error messages

Bugfix 082 - Centerprint messages looses the coloration when printing multiple lines

Problem:

When a center print contains color codes and the text is broken onto multiple lines, the next lines will start with white instead of the last color used.

Solution:

Backup the current color code, so it can be used on the subsequent lines.

2.56 & 2.60 Code

cg_drawtools.c @ 405 Coordinates are at 640 by 480 virtual resolution ==================
CHRUKER: b082 - setColor is no longer const
*/ void CG_DrawStringExt( int x, int y, const char *string, const float *setColor, qboolean forceColor, qboolean shadow, int charWidth, int charHeight, int maxChars ) { vec4_t color; const char *s;
cg_drawtools.c @ 452 color[3] = setColor[3]; } trap_R_SetColor( color );
// CHRUKER: b082 - Save the new color so that it can be used on subsequent lines memcpy( setColor, color, sizeof(color) );
} s += 2; continue;
cg_local.h @ 2296 float charWidth, float charHeight, const float *modulate );
// CHRUKER: b082 - setColor is no longer const
void CG_DrawStringExt( int x, int y, const char *string, const float *setColor, qboolean forceColor, qboolean shadow, int charWidth, int charHeight, int maxChars ); // JOSEPH 4-17-00 void CG_DrawStringExt2( int x, int y, const char *string, const float *setColor,

Show index
Previous bug: During team switching you can sometime spawn immediately
Next bug: Improving script error messages

Color coding

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

©2017 Chruker