ACharacter::ServerMove_Validate
Deprecated: Use ServerMovePacked() validation path instead.
#include "GameFramework/Character.h"
Access: public
Specifiers: deprecated
Description
Validation function for the deprecated ServerMove RPC. Returns true to accept the move; returning false kicks the client. Part of UE's WithValidation RPC pattern for the legacy move replication path.
Caveats & Gotchas
- • Deprecated since 4.26 alongside ServerMove(). Validation for the packed path is handled inside CharacterMovementComponent, not here.
- • Returning false disconnects the offending client immediately — only do so for clearly invalid data, not for normal gameplay edge cases.
Signature
bool ServerMove_Validate(float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, UPrimitiveComponent* ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| TimeStamp | float | Client timestamp. | — |
| InAccel | FVector_NetQuantize10 | Client acceleration. | — |
| ClientLoc | FVector_NetQuantize100 | Client location. | — |
| CompressedMoveFlags | uint8 | Movement flags. | — |
| ClientRoll | uint8 | Client roll. | — |
| View | uint32 | Client view. | — |
| ClientMovementBase | UPrimitiveComponent* | Movement base. | — |
| ClientBaseBoneName | FName | Base bone name. | — |
| ClientMovementMode | uint8 | Movement mode. | — |
Return Type
bool Example
Custom validation: reject impossibly fast moves C++
bool AMyCharacter::ServerMove_Validate(float TimeStamp, FVector_NetQuantize10 InAccel,
FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll,
uint32 View, UPrimitiveComponent* ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode)
{
// Reject absurdly large accelerations as a basic cheat check
return InAccel.SizeSquared() <= FMath::Square(MaxAllowedAcceleration);
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | deprecated | — |
| 4.26 | deprecated | — |
Feedback
Was this helpful?