yea, this code looks somewhat mistaken to me.
I would think of
Code:
// get a rough idea of how high it can be thrown
vecMidPoint = vecSpot1 + (VecSpot2 - VecSpot1) * 0.5;
TRACE_HULL (vecMidPoint, vecMidPoint + Vector (0, 0, 500), ignore_monsters, head_hull, pEdict, &tr);
vecMidPoint = tr.vecEndPos;
vecMidPoint.z--;
as the right code.
TRACE_HULL because a TraceLine would pass through the sky meshes whereas the grenade would bounce on it
And checking for flFraction is a bug since IF the grenade can actually reach 500 ft high (which is not that high in fact), then vecMidPoint would be left lined up with vecSpot1 and vecSpot2, which is NOT something we want, definitely.