UCharacterMovementComponent::ResetPredictionData_Server
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualoverrideENGINE_API
Description
Discards the server-side prediction data (FNetworkPredictionData_Server_Character), forcing it to be reallocated on next use. Only meaningful when this component's owner has authority.
Caveats & Gotchas
- • Calling this on a client has no effect since server prediction data is only allocated on the authority.
- • Discards accumulated server move history, so any in-flight client moves that were being tracked for correction/error-checking are lost.
- • Rarely needs to be called directly from game code; it exists mainly as a hook for custom movement components that manage their own server data lifecycle.
Signature
virtual void ResetPredictionData_Server() override Return Type
void Example
Force reallocation of server prediction data C++
if (GetOwner()->HasAuthority())
{
CharacterMovementComponent->ResetPredictionData_Server();
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?