Class GameTimeCheatingDetector
Detects speed hacks and fixed-delta tampering, and keeps a corrected clock for ProtectedTime.
Implements
Inherited Members
Namespace: GUPS.AntiCheat.Detector
Assembly: cs.temp.dll.dll
Syntax
public class GameTimeCheatingDetector : ADetector
Remarks
Listens to the
Fields
OnCheatingDetectionEvent
Raised for every window that confirms cheating. Wire a reaction in the inspector without writing an observer.
Declaration
public CheatingDetectionEvent<CheatingDetectionStatus> OnCheatingDetectionEvent
Field Value
| Type | Description |
|---|---|
| CheatingDetectionEvent<CheatingDetectionStatus> |
Properties
DeltaTimeCheatingDetected
Gets whether the most recent evaluated window confirmed clock speed manipulation.
Declaration
public bool DeltaTimeCheatingDetected { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
FixedDeltaTimeCheatingDetected
Gets whether the most recent evaluated window contained fixed delta time manipulation.
Declaration
public bool FixedDeltaTimeCheatingDetected { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsSupported
Gets a value indicating whether the detector is supported on the current platform.
Declaration
public override bool IsSupported { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Name
Gets the human-readable name of the detector.
Declaration
public override String Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
PossibilityOfFalsePositive
False-positive likelihood sent with each detection. Hitches and scene loads do not move the reference clock, so this stays moderate.
Declaration
public float PossibilityOfFalsePositive { get; }
Property Value
| Type | Description |
|---|---|
| System.Single |
PossibleCheatingDetected
Gets whether the most recent evaluated window confirmed cheating of any kind. Cleared again by a clean window.
Declaration
public override bool PossibleCheatingDetected { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
ThreatRating
Gets the threat rating reported with every detection. Higher values denote greater perceived threats.
Declaration
public override uint ThreatRating { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Overrides
TimeDeviation
Latest clock deviation.
Declaration
public ETimeDeviation TimeDeviation { get; }
Property Value
| Type | Description |
|---|---|
| ETimeDeviation |
Methods
Awake()
Subscribes to the
Declaration
protected override void Awake()
Overrides
OnCompleted()
Called when an observed subject signals completion.
Declaration
public override void OnCompleted()
Overrides
OnDestroy()
Unsubscribes from the monitor and unhooks scene loading.
Declaration
protected virtual void OnDestroy()
OnError(Exception)
Called when an observed subject reports an error.
Declaration
public override void OnError(Exception _Error)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | _Error | The error reported by the observed subject. |
Overrides
OnLevelFinishedLoading(Scene, LoadSceneMode)
Resets the protected time since level load when a new scene is loaded.
Declaration
protected virtual void OnLevelFinishedLoading(Scene _Scene, LoadSceneMode _Mode)
Parameters
| Type | Name | Description |
|---|---|---|
| Scene | _Scene | The loaded scene. |
| LoadSceneMode | _Mode | The scene loading mode. |
OnNext(IWatchedSubject)
Stores one monitor report and evaluates the window once it is full.
Declaration
public override void OnNext(IWatchedSubject _Subject)
Parameters
| Type | Name | Description |
|---|---|---|
| IWatchedSubject | _Subject | The status published by the game time monitor. |
Overrides
Update()
Advances the protected clock. Runs early so ProtectedTime stays constant for the rest of the frame, like
Declaration
protected virtual void Update()