Okay, so for my Artificial Intelligence in Racing Simulators project using Live For Speed, I really want to limit this to Single Player only, even better if I could limit to "Single Player" _ONLY_ meaning; no Multiplayer, no Hot lapping or Training.
Inside the IS_STA packet I can detect if the player is playing by checking to see if ISS_GAME is turned on _AND_ ISS_MULTI is turned off. However, using InSimSniffer, with many different situations I've found that even while watching a multiplayer replay ISS_GAME is turned on AND ISS_MULTI is turned off. Which would allow the LFS -> AIRS interface to believe it can successfully work, when it can not.
I can so far detect when the player is watching a SPR, connected to a server - including their own or multiplayer in general (which is a good elimination as that prevents people from abusing this to gain miles in LFS or compete with the AIRS).
But I still need to detect hotlapping and MPR correctly, any thoughts ideas or things I've overlooked?
EDIT: Ahaa. I can now detect the MPR correctly, actually I was already detecting it correctly. My detection works like this so far, still need to detect Hot Lap mode...
"OnConnect" -> Request IS_STA from LFS using the TINY...
When STA is received, set "IsSafeToUseAIRS = false".
Only set "IsSafeToUseAIRS = true" IF the ISS_MULTI is off and ISS_GAME is on.
If IsSafeToUseAIRS then request IS_NCN from LFS.
When NCN is sent, make sure there is only 1 Total connection, and that the UCID is 0, 'host'. Which will eliminate MPR, at least those where the player was not alone on the host. . . Hmmm.
Still would like a way to detect hotlapping, and perhaps a better way to detect MPR.
Inside the IS_STA packet I can detect if the player is playing by checking to see if ISS_GAME is turned on _AND_ ISS_MULTI is turned off. However, using InSimSniffer, with many different situations I've found that even while watching a multiplayer replay ISS_GAME is turned on AND ISS_MULTI is turned off. Which would allow the LFS -> AIRS interface to believe it can successfully work, when it can not.
I can so far detect when the player is watching a SPR, connected to a server - including their own or multiplayer in general (which is a good elimination as that prevents people from abusing this to gain miles in LFS or compete with the AIRS).
But I still need to detect hotlapping and MPR correctly, any thoughts ideas or things I've overlooked?
EDIT: Ahaa. I can now detect the MPR correctly, actually I was already detecting it correctly. My detection works like this so far, still need to detect Hot Lap mode...
"OnConnect" -> Request IS_STA from LFS using the TINY...
When STA is received, set "IsSafeToUseAIRS = false".
Only set "IsSafeToUseAIRS = true" IF the ISS_MULTI is off and ISS_GAME is on.
If IsSafeToUseAIRS then request IS_NCN from LFS.
When NCN is sent, make sure there is only 1 Total connection, and that the UCID is 0, 'host'. Which will eliminate MPR, at least those where the player was not alone on the host. . . Hmmm.
Still would like a way to detect hotlapping, and perhaps a better way to detect MPR.