I have build an app using C# and I am trying to store results once a multiplayer race is completed. The only reasonable way I can think of is to capture the EventStringCode 'SEND' which should be received when the race is over. Saying this, it seems that I am having issues receiving EventPackets and I am not sure what I am doing wrong.
To explain better I have created the PacketEventData struct as follows:
/* Sent when an event occurs */
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct PacketEventData
{
[MarshalAs(UnmanagedType.Struct)]
public PacketHeader m_header;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public byte[] m_eventStringCode;
EventDataDetails m_eventDetails;
}
Some events are actually received but this does not apply for all. For example: SSTA is received for all races, same applies for DRSE. BUT, the FTLP is not always received. In a whole race where there are numerous changes in the fastest lap I am only receiving this event once! Furthermore I do not receive any of the other events like team mate in pits, chequered flag or session ended.
Any ideas on what could be causing such issues? I do not have any other issues with other packets.