ACharacter::ServerMoveNoBase_Validate
Deprecated: Use ServerMovePacked validation instead.
#include "GameFramework/Character.h"
Access: public
Description
Validation function for the ServerMoveNoBase RPC. Returning false kicks the calling client. The default implementation returns true.
Caveats & Gotchas
- • Returning false from a Validate function immediately disconnects the client — only do so for truly malicious or impossible input, not for cheating suspicion alone.
- • This validator fires before the _Implementation body runs, so expensive checks here can hurt server performance since the RPC is unreliable and may arrive frequently.
Signature
ENGINE_API bool ServerMoveNoBase_Validate(float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, uint8 ClientMovementMode) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| TimeStamp | float | Client timestamp to validate. | — |
| InAccel | FVector_NetQuantize10 | Client acceleration to validate. | — |
| ClientLoc | FVector_NetQuantize100 | Client location to validate. | — |
| CompressedMoveFlags | uint8 | Compressed move flags to validate. | — |
| ClientRoll | uint8 | Client roll to validate. | — |
| View | uint32 | Client view to validate. | — |
| ClientMovementMode | uint8 | Client movement mode to validate. | — |
Return Type
bool Example
Sanity-check acceleration magnitude C++
bool AMyCharacter::ServerMoveNoBase_Validate(
float TimeStamp, FVector_NetQuantize10 InAccel,
FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags,
uint8 ClientRoll, uint32 View, uint8 ClientMovementMode)
{
// Reject absurdly large accelerations to guard against packet manipulation
if (InAccel.SizeSquared() > FMath::Square(10000.f))
{
return false;
}
return Super::ServerMoveNoBase_Validate(
TimeStamp, InAccel, ClientLoc, CompressedMoveFlags,
ClientRoll, View, ClientMovementMode);
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?