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: No skill or XP displayed in the playerstat dropdown until a weapon has been fired
Next bug: Endgame awards and medals get handed out to the player with the highest XP in the different fields

Bugfix 016 - Persistent score doesn't get updated if there hasn't happened anything in the map

Problem:

Persistent score doesn't get updated, if there hasn't happened anything in the map. This leads to no score getting logged for the client in the server log.

Solution:

Just make sure to calculate the ranks at least once before logging the game status.

Notes:

The bug is still present in version 2.60

2.56 & 2.60 Code

g_main.c @ 2386 (2.56) @ 2533 (2.60) trap_SetConfigstring( CS_INTERMISSION, "1" );
G_LogPrintf( "red:%i blue:%i\n", level.teamScores[TEAM_AXIS], level.teamScores[TEAM_ALLIES] ); // NERVE - SMF - send gameCompleteStatus message to master servers trap_SendConsoleCommand( EXEC_APPEND, "gameCompleteStatus\n" );
for( i = 0; i < level.numConnectedClients; i++ ) { int ping; cl = &level.clients[level.sortedClients[i]]; g_entities[level.sortedClients[i]].s.eFlags &= ~EF_READY; cl->ps.eFlags &= ~EF_READY; if ( cl->sess.sessionTeam == TEAM_SPECTATOR ) { continue; } if ( cl->pers.connected == CON_CONNECTING ) { continue; }
// CHRUKER: b016 - Make sure all the stats are recalculated and accurate G_CalcRank( cl );
ping = cl->ps.ping < 999 ? cl->ps.ping : 999; G_LogPrintf( "score: %i ping: %i client: %i %s\n", cl->ps.persistant[PERS_SCORE], ping, level.sortedClients[i], cl->pers.netname ); }
// CHRUKER: b016 - Moved here because we needed the stats to be up-to-date before sending G_LogPrintf( "red:%i blue:%i\n", level.teamScores[TEAM_AXIS], level.teamScores[TEAM_ALLIES] ); // NERVE - SMF - send gameCompleteStatus message to master servers trap_SendConsoleCommand( EXEC_APPEND, "gameCompleteStatus\n" ); // b016
// NERVE - SMF if( g_gametype.integer == GT_WOLF_STOPWATCH ) {

Show index
Previous bug: No skill or XP displayed in the playerstat dropdown until a weapon has been fired
Next bug: Endgame awards and medals get handed out to the player with the highest XP in the different fields

Color coding

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

©2017 Chruker