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: Round timer and respawn timer not shown when cg_drawFireteamOverlay is 0
Next bug: Making sure dead coverts loose their uniform [duplicate of b006]

Bugfix 009 - Spectators can hear when a covert spot a mine

Problem:

Spectators can hear when coverts spots a mine.

Solution:

When there is a spotted landmine notification, check that there player isn't a spectator. This needs to be done two places. Once for the sound notification and once for the popupmessage.

References:

Spawning thread

Notes:

The bug is still present in version 2.60

2.56 & 2.60 Code

cg_popupmessages.c @ 431 (2.56) @ 444 (2.60) break; case PM_MINES:
// CHRUKER: b009 - Prevent spectators from being informed when a mine is spotted if( cgs.clientinfo[cg.clientNum].team == TEAM_SPECTATOR ) { return NULL; }
if( cgs.clientinfo[cg.clientNum].team == cent->currentState.effect2Time ) { return NULL;
cg_popupmessages.c @ 490 (2.56) @ 507 @ (2.60) break; case PM_MINES:
// CHRUKER: b009 - Prevent spectators from being informed when a mine is spotted if( cgs.clientinfo[cg.clientNum].team == TEAM_SPECTATOR ) { break; }
if( cgs.clientinfo[cg.clientNum].team != cent->currentState.effect2Time ) { // inverted teams

Show index
Previous bug: Round timer and respawn timer not shown when cg_drawFireteamOverlay is 0
Next bug: Making sure dead coverts loose their uniform [duplicate of b006]

Color coding

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

©2017 Chruker