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: When a landmine cannot be placed, the correct amount of weapon charge is given back
Next bug: Binoculars can no longer be applied when mobile mg42 is deployed

Bugfix 052 - Couldn't disarm enemy landmines when we have used all our own landmines

Problem:

The max landmines was checked and branched before the owner team was checked.

Solution:

Check the ownerteam at the same time as max landmines.

Notes:

The bug was fixed in version 2.60

2.56 Code

g_weapon.c @ 1562 ent->client->sess.aWeaponStats[WS_LANDMINE].atts--; return; } else if(G_CountTeamLandmines(ent->client->sess.sessionTeam) >= MAX_TEAM_LANDMINES && G_LandmineTeam(traceEnt) == ent->client->sess.sessionTeam ) { // CHRUKER: b052 - Only check for max. landmines when its one of our own. if(G_LandmineUnarmed(traceEnt)) {
if ( G_LandmineTeam( traceEnt ) != ent->client->sess.sessionTeam ) return;
trap_SendServerCommand(ent-g_entities, "cp \"Your team has too many landmines placed...\" 1");

Show index
Previous bug: When a landmine cannot be placed, the correct amount of weapon charge is given back
Next bug: Binoculars can no longer be applied when mobile mg42 is deployed

Color coding

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

©2017 Chruker