RealDocs

UCharacterMovementComponent::ServerMoveOld_Validate

function Engine Since 4.0
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: virtualENGINE_API

Description

The RPC validation function paired with ServerMoveOld_Implementation(); returning false rejects the RPC before it runs and can trigger a network security violation.

Caveats & Gotchas

  • Not wrapped by DEPRECATED_CHARACTER_MOVEMENT_RPC like its sibling functions, but it's only relevant when the deprecated legacy RPC path is compiled in — it exists purely to satisfy the UFUNCTION(Server, WithValidation) contract for ServerMoveOld.
  • Returning false repeatedly for a given connection can cause the engine to treat the client as malicious and close the connection.
  • The base implementation always returns true; there is no built-in validation of the parameters themselves.

Signature

virtual bool ServerMoveOld_Validate(float OldTimeStamp, FVector_NetQuantize10 OldAccel, uint8 OldMoveFlags)

Parameters

Name Type Description Default
OldTimeStamp float Timestamp of the older move being resent.
OldAccel FVector_NetQuantize10 Quantized acceleration for the old move.
OldMoveFlags uint8 Compressed input flags for the old move (e.g. jump).

Return Type

bool

Example

Validation entry point (engine-internal, deprecated path) C++
// Invoked by the engine's RPC dispatch before ServerMoveOld_Implementation():
if (!CharacterMovementComponent->ServerMoveOld_Validate(OldTimeStamp, OldAccel, OldMoveFlags))
{
    // Connection may be flagged as sending invalid data
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.