Errrrrrr i must have taken out the part of that, the loop would try one trace after another, to see if we can possibly fit the bbox from start to finish..basically
Also note: that was ripped from direct function, no shit the muzzle and stuff won't be updated because i didn't post the whole function!
num = MDRIVER_RANGE;
for( i = 0; i < num; i++ )
{
BG_FindBBoxForClass( ent->grav->client->ps.stats[ STAT_PCLASS ], mins, maxs, NULL, NULL, NULL );
AngleVectors( ent->client->ps.viewangles, forward, right, up );
CalcMuzzlePoint( ent, forward, right, up, muzzle );
SnapVectorTowards( tr.endpos, muzzle );
VectorMA( muzzle, i, forward, end );
trap_Trace( &tr, muzzle, mins, maxs, end, ent->grav->s.number, MASK_SHOT );
trap_Trace( &tr2, muzzle, NULL, NULL, end, ent->grav->s.number, MASK_SHOT );
if( tr.fraction == 1.0f && tr2.fraction == 1.0f )
{
VectorCopy( tr.endpos, ent->grav->client->ps.origin );
VectorCopy( tr.endpos, ent->grav->r.currentOrigin );
}
}
Happy now? that is the direct code, the previous one i took the end calculation out...