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: Cleanups in bot code 2
Next bug: Cleanups in clientside code 1

Bugfix 074 - Cleanups in serverside code 2

Problem:

The G_FindIpData function is using the wrong limit when it is looking through the XP storage. The function is only called if a modder has enabled the code marked USEXPSTORAGE. And erronous data can only be returned if the data it is pointing to has a valid value in the timeadded position and a value matching your IP address in the IP filter positions.

Solution:

Use these changes.

Notes:

The bug is still present in version 2.60
It seems very unlikely that this bug would ever return false XP data.
There are a couple of other bugs in the USESTORAGEXP code: 1) Start skill points and total score are not reset to the value loaded from the storage. 2) On firstTime connects the value loaded from the storage is overwritten by the session value if the map is restarted during the connect.

2.56 & 2.60 Code

g_svcmds.c @ 206 in = *(unsigned *)m;
// CHRUKER: b074 - Was using MAX_IPFILTERS which has a limit of 1024 instead of 64
for( i = 0; i < MAX_XPSTORAGEITEMS; i++ ) { if( !ipXPStorageList->ipFilters[ i ].timeadded || level.time - ipXPStorageList->ipFilters[ i ].timeadded > ( 5 * 60000 ) ) { continue;

Show index
Previous bug: Cleanups in bot code 2
Next bug: Cleanups in clientside code 1

Color coding

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

©2017 Chruker