minolin / acplugins

R&D about the upcoming server plugin infrastrucure of Assetto Corsa, driving simulator by Kunos simulazioni
Apache License 2.0
18 stars 4 forks source link

Find the Session-Type declarations #1

Closed minolin closed 9 years ago

minolin commented 9 years ago

Trying to simplyfiy the session type I wanted to map it to a simple enum, so we can just use SessionTypeEnum.Race or whatvever in code:

{ Practise = 0, Qualifying = 1, Race = 2, Drag = 3, Drift = 4 }

But I don't know the real values, probably they are already used in the server's config.ini

ghost commented 9 years ago

cant you grab the trackdata json to gather them?

I have to setup and own local sever this weekend to do some research on the plugin to server capabilities that we currenty have.

never-eat-yellow-snow commented 9 years ago

This should be related to this information from the INFO page (:http_port/INFO):

{... "sessiontypes":[2,3] ... }

So I guess 2 means Qualifying and 3 means Race.

flitzi commented 9 years ago
    /// <summary>
    /// Not sure about Drag and Drift, but those probably don't exist in multiplayer.
    /// </summary>
    public enum SessionTypeEnum : byte { Practice = 1, Qualifying = 2, Race = 3, Drag = 4, Drift = 5 }

(Included in pull request)

minolin commented 9 years ago

Can copy 2+3, so I'm good with that. Perfect, thank you.