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: Players field of view at intermission is different if you had deployed a MG42
Next bug: Sorting the maps, campaigns and mods list

Bugfix 089 - Player view is distorted in intermission if you have ridden an vehicle, mounted a tank

Problem:

The bug is that your player position keeps riding the vehicle when you have moved to intermission. So you would see some jerking. Also the connection between a player and a tank would not be removed, causing the player to still be connected.

Solution:

Grab the latest angles, when in intermission. The intermission camera position is not going to be moving anywhere. And for the 2nd problem just call G_LeaveTank and have it cut the connection.

Notes:

I'm still not sure that the fix for the jerking movement is correct. It is caused on the client by some data during the prediction that is not correctly zero'ed when moving to intermission. However I've tried zero'ing a lot of different properties, even the trajectories used in the prediction, but with no result.

2.60 Code

cg_predict.c @ 799 return; }
// CHRUKER: b089 - Player view is distorted in intermission if you have ridden an vehicle, mounted a tank
// non-predicting local movement will grab the latest angles if ( cg_nopredict.integer || cg.predictedPlayerState.pm_type == PM_INTERMISSION #ifdef ALLOW_GSYNC || cg_synchronousClients.integer #endif // ALLOW_GSYNC
g_main.c @ 2286 // clean up powerup info // memset( ent->client->ps.powerups, 0, sizeof(ent->client->ps.powerups) );
// CHRUKER: b089 - Player view is distorted in intermission if you have ridden an vehicle, mounted a tank if( ent->tankLink ) {G_LeaveTank( ent, qfalse );} // b089
ent->client->ps.eFlags = 0; ent->s.eFlags = 0; ent->s.eType = ET_GENERAL;

Show index
Previous bug: Players field of view at intermission is different if you had deployed a MG42
Next bug: Sorting the maps, campaigns and mods list

Color coding

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

©2017 Chruker