Amp brought this up in here: http://www.lfsforum.net/showthread.php?t=62060
struct IS_OBH // OBject Hit
{
byte Size; // 32
byte Type; // ISP_CON
byte ReqI; // 0
byte Zero;
byte ObjectType; // object type (varies between track)
byte ObjectCategory; // tyre / cone / object / segment
byte ObjectInfo; // movable / etc...
byte SurfaceType; // surface type (only segments)
short X; // object position (1 metre = 16)
short Y; // object position (1 metre = 16)
CarContact A;
};
byte Closing; // the closing speed of the collision in m/s (suggests severity)
int polySides = 14;
int polyX[polySides ] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int polyY[polySides ] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
bool Check_Pos(int polySides,int polyX[],int polyY[],float x,float y)
{
int i, j=polySides-1 ;
bool oddNodes=false ;
for (i=0; i<polySides; i++)
{
if (polyY[i]<y && polyY[j]>=y
|| polyY[j]<y && polyY[i]>=y)
{
if (polyX[i]+(y-polyY[i])/(polyY[j]-polyY[i])*(polyX[j]-polyX[i])<x)
{
oddNodes=!oddNodes;
}
}
j=i;
}
return oddNodes;
}