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: Level 0 fieldops was using the medic charge times when handing out ammo
Next bug: Fireteam Delta's icon doesn't show up

Bugfix 029 - Medic revive, medic adrenaline and engineer pliers can't be used under water

Problem:

A few tools/weapons can't be used under water. The game draws wounded players under water and they also viewlock after medics, so medics should be able to revive under water. And if you can use the medic needle under water you should also be able to use the adrenaline needle. Finally engineers can throw dynamite and landmines, so they should also be able to arm them.

Solution:

Add the medic revive, pliers and adrenaline to the list of weapons which should work underwater. Other weapons could be added, but you risk that they get exploited.

Notes:

The bug is still present in version 2.60

2.56 & 2.60 Code

bg_pmove.c @ 3673 (2.56) @ 3792 (2.60) // player is underwater - no fire if(pm->waterlevel == 3) { if( pm->ps->weapon != WP_KNIFE && pm->ps->weapon != WP_GRENADE_LAUNCHER && pm->ps->weapon != WP_GRENADE_PINEAPPLE &&
pm->ps->weapon != WP_MEDIC_SYRINGE && // CHRUKER: b029 - Was missing
pm->ps->weapon != WP_DYNAMITE &&
pm->ps->weapon != WP_PLIERS && // CHRUKER: b029 - Was missing
pm->ps->weapon != WP_LANDMINE && pm->ps->weapon != WP_TRIPMINE &&
pm->ps->weapon != WP_MEDIC_ADRENALINE && // CHRUKER: b029 - Was missing
pm->ps->weapon != WP_SMOKE_BOMB ) { PM_AddEvent(EV_NOFIRE_UNDERWATER); // event for underwater 'click' for nofire pm->ps->weaponTime = 500; pm->ps->weaponDelay = 0; // avoid insta-fire after water exit on delayed weapon attacks return; } }

Show index
Previous bug: Level 0 fieldops was using the medic charge times when handing out ammo
Next bug: Fireteam Delta's icon doesn't show up

Color coding

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

©2017 Chruker