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: Getting level 4 light weapons or heavy weapons during a map make people spawn as soldier with a SMG
Next bug: Damage distance falloff is inverted between 1500-2500 units

Bugfix 021 - When using Panzer and SMG, it switches to grenades and not the SMG after you fire the panzer

Problem:

When using Panzer and SMG, it switches to grenades and not the SMG after you fire the panzer.

Solution:

It only check for gun or grenades. The fix is to also check for the SMG.

Notes:

The bug is still present in version 2.60

2.56 & 2.60 Code

cg_weapons.c @ 4186 (2.56) @ 4230 (2.60) // JPW NERVE -- early out if we just fired Panzerfaust, go to pistola, then grenades if (cg.weaponSelect == WP_PANZERFAUST) {
// CHRUKER: b021 - Actually use a SMG first if we got it for( i = 0; i < MAX_WEAPS_IN_BANK_MP; i++ ) { // CHRUKER: b021 - Make sure we don't reselect the panzer. (That took me a while to figure that out :-) if (weapBanksMultiPlayer[3][i] != WP_PANZERFAUST && CG_WeaponSelectable(weapBanksMultiPlayer[3][i])) { // find a smg cg.weaponSelect = weapBanksMultiPlayer[3][i]; CG_FinishWeaponChange(cg.predictedPlayerState.weapon, cg.weaponSelect); return; } } // b021
for( i = 0; i < MAX_WEAPS_IN_BANK_MP; i++ ) { if (CG_WeaponSelectable(weapBanksMultiPlayer[2][i])) { // find a pistol

Show index
Previous bug: Getting level 4 light weapons or heavy weapons during a map make people spawn as soldier with a SMG
Next bug: Damage distance falloff is inverted between 1500-2500 units

Color coding

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

©2017 Chruker