Open viper4gh opened 4 years ago
The Shared Memory of pcars2 is providing the additional value "mPitModes" for all drivers with the following states: PIT_MODE_NONE, PIT_MODE_DRIVING_INTO_PITS, PIT_MODE_IN_PIT, PIT_MODE_DRIVING_OUT_OF_PITS, PIT_MODE_IN_GARAGE, PIT_MODE_DRIVING_OUT_OF_GARAGE
Solution: write the PitMode into the RaceState if the the following PitModes are active: EnteringPits, InPits and ExitingPits. After some tests the RaceState stays on "Racing" all the time when these PitModes are active. In result you lost no info if you overwrite the RaceState with these PitModes.
The pit counter is triggered by the driver state change to "EnteringPits". This is working in DS modes, but not in the CREST modes. In CREST mode it is not possible, because the driver state is not available in the Shared Memory API. In CREST2 mode it is not working, because the driver state does not include an "EnteringPits" state.
DS driver states: Racing, Finished, DNF, Disqualified, Retired, InGarage, EnteringPits, InPits, ExitingPits
CREST2/Shared Memory pcars2 states: RACESTATE_INVALID, RACESTATE_NOT_STARTED, RACESTATE_RACING, RACESTATE_FINISHED, RACESTATE_DISQUALIFIED, RACESTATE_RETIRED, RACESTATE_DNF,