MCPcopy Create free account
hub / github.com/arnaud-jamin/Cog / GetClientLag

Method GetClientLag

Source/CogSample/CogSamplePlayerController.cpp:226–231  ·  view source on GitHub ↗

--------------------------------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

224
225//--------------------------------------------------------------------------------------------------------------------------
226float ACogSamplePlayerController::GetClientLag() const
227{
228 const float Ping = (PlayerState != nullptr && GetNetMode() != NM_Standalone) ? PlayerState->ExactPing : 0.0f;
229 const float HalfPingInSeconds = Ping * 0.0001f * 0.5f;
230 return HalfPingInSeconds;
231}
232
233//--------------------------------------------------------------------------------------------------------------------------
234void ACogSamplePlayerController::Server_ProjectileHit_Implementation(UCogSampleProjectileComponent* Projectile, const FHitResult& HitResult)

Callers 1

ActivateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected