Amp brought this up in here: http://www.lfsforum.net/showthread.php?t=62060
                
             As always, many seemingly simple ideas are very hard to convert into code, I'm sure.
 As always, many seemingly simple ideas are very hard to convert into code, I'm sure.


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;
};
 I might just note that for the collision with another car the CarContact could really contain pedal info (throttle, brake), as Dave suggested earlier.
 I might just note that for the collision with another car the CarContact could really contain pedal info (throttle, brake), as Dave suggested earlier.

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;
}

