swiftlys2/docs/api/releases/features/ai/
API Reference › SteamAPI

DurationControl_t

Struct
Namespace: SwiftlyS2.Shared.SteamAPI · Assembly: SwiftlyS2.CS2.dll
public struct DurationControl_t

sent for games with enabled anti indulgence / duration control, for enabled users. Lets the game know whether the user can keep playing or whether the game should exit, and returns info about remaining gameplay time. This callback is fired asynchronously in response to timers triggering. It is also fired in response to calls to GetDurationControl().

View source

Fields

k_iCallback

public const int k_iCallback = 167
Field Value

m_appid

appid generating playtime

public AppId_t m_appid
Field Value

m_bApplicable

is duration control applicable to user + game combination

public bool m_bApplicable
Field Value

m_csecsLast5h

playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in seconds

public int m_csecsLast5h
Field Value

m_csecsRemaining

playtime remaining until the user hits a regulatory limit

public int m_csecsRemaining
Field Value

m_csecsToday

playtime on current calendar day

public int m_csecsToday
Field Value

m_eResult

result of call (always k_EResultOK for asynchronous timer-based notifications)

public EResult m_eResult
Field Value

m_notification

notification to show, if any (always k_EDurationControlNotification_None for API calls)

public EDurationControlNotification m_notification

m_progress

recommended progress (either everything is fine, or please exit game)

public EDurationControlProgress m_progress