![]() |
|
Mapping Mapping sizes Limits Entities Bugs & Work-a-rounds Notes Scripting reference Mapping - Tutorials Brushwork from blueprint Tools Brush generator Vehicle generator MD3 Tag The Dummy Modding Project: Bug Fix Project: Crockett Other stuff Forum Server Info Colors Voice Chats Scripts Links |
Project: Bug FixThe objectiveThe 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: Oversize server commands Next bug: Self headshot when proned Bugfix 002 - Backstab knife damage on wounded players exploitProblem:Stabbing a wounded player from certain angles was detected as a backstab, and therefore the inflicted damage was upped.Solution:Make sure the inflicted damage is only upped when the player has positive health (ie. is alive).References:Spawning threadNotes:The bug is semi-fixed in version 2.60. It fixed the level 4 coverts that didn't get the backstab bonus, however it still does backstab damage on wounded players.2.60 Code
g_weapon.c @ 139
if( ent->client->sess.playerType == PC_COVERTOPS )
damage *= 2; // Watch it - you could hurt someone with that thing!
// CHRUKER: b002 - Only do backstabs if the body is standing up (ie. alive)
if(traceEnt->client && traceEnt->health > 0)
{
AngleVectors (ent->client->ps.viewangles, pforward, NULL, NULL);
AngleVectors (traceEnt->client->ps.viewangles, eforward, NULL, NULL);
if( DotProduct( eforward, pforward ) > 0.6f ) // from behind(-ish)
{
damage = 100; // enough to drop a 'normal' (100 health) human with one jab
mod = MOD_KNIFE;
// rain - only do this if they have a positive health
if ( traceEnt->health > 0 && ent->client->sess.skill[SK_MILITARY_INTELLIGENCE_AND_SCOPED_WEAPONS] >= 4 ) {
damage = traceEnt->health;
}
}
}
2.56 Code
g_weapon.c @ 139
if( ent->client->sess.playerType == PC_COVERTOPS )
damage *= 2; // Watch it - you could hurt someone with that thing!
// CHRUKER: b002 - Only do backstabs if the body is standing up (ie. alive)
if(traceEnt->client && traceEnt->health > 0)
{
AngleVectors (ent->client->ps.viewangles, pforward, NULL, NULL);
AngleVectors (traceEnt->client->ps.viewangles, eforward, NULL, NULL);
Show index Previous bug: Oversize server commands Next bug: Self headshot when proned Color codingSample = New codeSample = Changed code (the new version is what is displayed) Sample = Deleted code |
©2018 Chruker |