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: Mine flags blocking other mines from being spotted
Next bug: Removed the non-existing restart command from referee help text

Bugfix 037 - Negative XP doesn't show up on the playerstat dropdown

Problem:

The server doesn't send the XP when it is less than 0, and the client stored the XP in an unsigned integer.

Solution:

Change the integer type, and send the XP when it is different from 0.

Notes:

The bug is still present in version 2.60

2.56 & 2.60 Code

cg_servercmds.c @ 1662 (2.56) @ 1684 (2.60) unsigned int nRounds = atoi(CG_Argv(iArg++)); unsigned int dwWeaponMask = atoi(CG_Argv(iArg++)); unsigned int dwSkillPointMask, xp = 0;
int xp = 0; // CHRUKER: b037 - Negative XP wouldn't show up on the playerstat screen
ci = &cgs.clientinfo[nClient];
g_match.c @ 394 (2.56) @ 399 (2.60) // Add skillpoints as necessary for(i=SK_BATTLE_SENSE; i<SK_NUM_SKILLS; i++) { if(refEnt->client->sess.skillpoints[i] != 0) { // CHRUKER: b037 - Need to add negative skillpoints too dwSkillPointMask |= (1 << i); Q_strcat(strSkillInfo, sizeof(strSkillInfo), va(" %d", (int)refEnt->client->sess.skillpoints[i])); } }

Show index
Previous bug: Mine flags blocking other mines from being spotted
Next bug: Removed the non-existing restart command from referee help text

Color coding

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

©2017 Chruker