Table of Contents

Struct TrackRules

Namespace
rF2SharedMemoryNet.RF2Data.Structs
Assembly
rF2SharedMemoryNet.dll

Represents the rules and state information for a racing track in rFactor 2.

public struct TrackRules
Inherited Members

Remarks

This structure encapsulates various parameters and states related to track rules, safety car behavior, yellow flag conditions, participant information, and other race-related data. It is primarily used to manage and communicate the current state of the track and race conditions during a session.

Fields

CurrentET

Represents the current elapsed time in seconds.

public double CurrentET

Field Value

double

InputExpansion

For future expansion.

public byte[] InputExpansion

Field Value

byte[]

InputOutputExpansion

For future expansion.

public byte[] InputOutputExpansion

Field Value

byte[]

MaximumColumnSpacing

Represents the maximum desired spacing between vehicles in a column.

public float MaximumColumnSpacing

Field Value

float

Remarks

A value of -1 indicates that the spacing is indeterminate or unenforced.

MaximumSpeed

Represents the maximum speed limit for driving.

public float MaximumSpeed

Field Value

float

Remarks

A value of -1 indicates that there is no speed limit.

Message

Represents a message intended for all users, providing context or information about the current state.

public byte[] Message

Field Value

byte[]

MinimumColumnSpacing

Represents the minimum desired spacing between vehicles in a column.

public float MinimumColumnSpacing

Field Value

float

Remarks

A value of -1 indicates that the spacing is indeterminate or unenforced.

MinimumSpeed

Represents the minimum speed that a vehicle should be driving.

public float MinimumSpeed

Field Value

float

Remarks

A value of -1 indicates that there is no minimum speed limit.

NumActions

Represents the number of recent actions performed.

public int NumActions

Field Value

int

NumParticipants

Number of participants

public int NumParticipants

Field Value

int

PitLaneStartDist

Represents the distance along the track where the waypoint branch to the pit lane begins.

public float PitLaneStartDist

Field Value

float

Pointer1

Not used

public byte[] Pointer1

Field Value

byte[]

Pointer2

Not used

public byte[] Pointer2

Field Value

byte[]

PoleColumn

Represents the column assignment where the pole position data is located.

public TrackRulesColumn PoleColumn

Field Value

TrackRulesColumn

SafetyCarActive

Indicates whether the safety car is active.

public byte SafetyCarActive

Field Value

byte

SafetyCarExists

Indicates whether a safety car exists in the current context.

public byte SafetyCarExists

Field Value

byte

SafetyCarInstruction

Represents the instruction for the safety car's behavior during a race.

public int SafetyCarInstruction

Field Value

int

Remarks

See SafetyCarInstruction for more details on the possible values.

SafetyCarLapDist

Safety car lap distance

public double SafetyCarLapDist

Field Value

double

SafetyCarLapDistAtStart

Where the safety car starts from

public float SafetyCarLapDistAtStart

Field Value

float

SafetyCarLaps

Gets or sets the number of laps completed by the safety car.

public int SafetyCarLaps

Field Value

int

SafetyCarMaximumSpacing

Represents the maximum allowable spacing behind the safety car.

public float SafetyCarMaximumSpacing

Field Value

float

Remarks

-1 indicates no limit.

SafetyCarMinimumSpacing

Represents the minimum spacing behind the safety car.

public float SafetyCarMinimumSpacing

Field Value

float

Remarks

-1 indicates no limit.

SafetyCarSpeed

Represents the maximum speed, at which the safety car can drive.

public float SafetyCarSpeed

Field Value

float

SafetyCarThreshold

Represents the threshold value at which a safety car is deployed.

public float SafetyCarThreshold

Field Value

float

Stage

Represents the current stage of the RF2 track rules.

public TrackRulesStage Stage

Field Value

TrackRulesStage

TeleportLapDist

Represents the distance to the front of the teleport locations, which serves as an initial estimate for determining where to signal the start of an event.

public float TeleportLapDist

Field Value

float

YellowFlagDetected

Indicates whether a yellow flag has been requested or the sum of participant yellow severity values exceeds the safety car threshold.

public byte YellowFlagDetected

Field Value

byte

YellowFlagLaps

Represents the suggested number of laps to run under a yellow flag condition.

public short YellowFlagLaps

Field Value

short

YellowFlagLapsWasOverridden

Indicates whether the yellow flag laps were overridden by an admin request.

public byte YellowFlagLapsWasOverridden

Field Value

byte

Remarks

See YellowFlagOveride for more details.

YellowFlagState

Represents the state of the yellow flag in a racing event.

public sbyte YellowFlagState

Field Value

sbyte

Remarks

See YellowFlagState for more details on the possible values.