Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/GameFramework > API/Runtime/Engine/GameFramework/UCharacterMovementComponent
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/GameFramework/CharacterMovementComponent.h |
| Include | #include "GameFramework/CharacterMovementComponent.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp |
virtual void OnTimeDiscrepancyDetected
&40;
float CurrentTimeDiscrepancy,
float LifetimeRawTimeDiscrepancy,
float Lifetime,
float CurrentMoveError
&41;
Remarks
Called by UCharacterMovementComponent::ProcessClientTimeStampForTimeDiscrepancy() (on server) when the time from client moves significantly differs from the server time, indicating potential time manipulation by clients (speed hacks, significant network issues, client performance problems)
Parameters
| Name | Description |
|---|---|
| CurrentTimeDiscrepancy | Accumulated time difference between client ServerMove and server time - this is bounded by MovementTimeDiscrepancy config variables in AGameNetworkManager, and is the value with which we test against to trigger this function. This is reset when MovementTimeDiscrepancy resolution is enabled |
| LifetimeRawTimeDiscrepancy | Accumulated time difference between client ServerMove and server time - this is unbounded and does NOT get affected by MovementTimeDiscrepancy resolution, and is useful as a longer-term view of how the given client is performing. High magnitude unbounded error points to intentional tampering by a client vs. occasional "naturally caused" spikes in error due to burst packet loss/performance hitches |
| Lifetime | Game time over which LifetimeRawTimeDiscrepancy has accrued (useful for determining severity of LifetimeUnboundedError) |
| CurrentMoveError | Time difference between client ServerMove and how much time has passed on the server for the current move that has caused TimeDiscrepancy to accumulate enough to trigger detection. |