I've found this bug is still not fixed...
in the VecCheckToss() function:
Code:
if (vecMidPoint.z < vecSpot2.z) // VERY BIG FAT BUG !
{
// to not enough space, fail
return g_vecZero;
}
// How high should the grenade travel to reach the apex
float distance1 = (vecMidPoint.z - vecSpot1.z);
float distance2 = (vecMidPoint.z - vecSpot2.z);
// How long will it take for the grenade to travel this distance
float time1 = sqrt( distance1 / (0.5 * flGravity) );
float time2 = sqrt( distance2 / (0.5 * flGravity) );
...Count Floyd only checks the vecSpot2.z here, which is wrong. We should check vecSpot1.z as well. Otherwise the following sqrt() will just eat a lot of negative values. I don't know what result this will cause (it doesn't crash in MSVC 6, but crashes in Borland Compiler and freezes in Visual Studio .NET beta during the following traceline).