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: Knife now has antilag
Next bug: Couldn't disarm enemy landmines when we have used all our own landmines

Bugfix 051 - When a landmine cannot be placed, the correct amount of weapon charge is given back

Problem:

The code never checked if the player was level 3 or above.

Solution:

Give .33f back if level 3 or above.

Notes:

The bug was fixed in version 2.60

2.56 Code

g_weapon.c @ 1559 Add_Ammo(ent, WP_LANDMINE, 1, qfalse);
// CHRUKER: b051 - Applying rain's fix to give back the correct charge amount if (ent->client->sess.skill[SK_EXPLOSIVES_AND_CONSTRUCTION] >= 3) ent->client->ps.classWeaponTime -= .33f * level.engineerChargeTime[ent->client->sess.sessionTeam-1]; else // b051
ent->client->ps.classWeaponTime -= .5f * level.engineerChargeTime[ent->client->sess.sessionTeam-1]; ent->client->sess.aWeaponStats[WS_LANDMINE].atts--;
g_weapon.c @ 1572 Add_Ammo(ent, WP_LANDMINE, 1, qfalse);
// CHRUKER: b051 - Applying rain's fix to give back the correct charge amount if (ent->client->sess.skill[SK_EXPLOSIVES_AND_CONSTRUCTION] >= 3) ent->client->ps.classWeaponTime -= .33f * level.engineerChargeTime[ent->client->sess.sessionTeam-1]; else // b051
ent->client->ps.classWeaponTime -= .5f * level.engineerChargeTime[ent->client->sess.sessionTeam-1]; ent->client->sess.aWeaponStats[WS_LANDMINE].atts--;

Show index
Previous bug: Knife now has antilag
Next bug: Couldn't disarm enemy landmines when we have used all our own landmines

Color coding

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

©2017 Chruker