I need to port this old metamod "no headshots to humans" plugin to cs source. I have complied the server plugin sample but know almost nothing about the hl2 sdk.
Can anyone give me some clues on how I would port these few lines into a hl2 server plugin?
Code:
//---------------------------------------------------------------------
// Disallow headshot damange to human players
//---------------------------------------------------------------------------
void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentToSkip, TraceResult *ptr)
{
TRACE_LINE(v1, v2, fNoMonsters, pentToSkip, ptr);
// disallow head shots to human players
if ( ( (1<<HITGROUP_HEAD) & (1<<ptr->iHitgroup)) &&
!(ptr->pHit->v.flags & FL_FAKECLIENT) )
{
ptr->flFraction = 1.0;
RETURN_META(MRES_SUPERCEDE);
}
else
RETURN_META(MRES_IGNORED);
}
Thanks a million.