UCharacterMovementComponent::FlushServerMoves
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualENGINE_API
Description
Immediately sends any pending client moves to the server rather than waiting for the normal send interval, forcing an out-of-band network update.
Caveats & Gotchas
- • Bypasses the bandwidth-conserving delay logic in CanDelaySendingMove()/GetClientNetSendDeltaTime() for whatever moves are currently pending — overusing it defeats the purpose of that throttling.
- • Has no effect on a client that isn't locally controlled, or on a server (there are no pending client-to-server moves to flush there).
- • Not exposed to Blueprint; intended for engine or plugin code that needs a move to reach the server immediately, e.g. right before a level transition.
Signature
virtual void FlushServerMoves() Return Type
void Example
Force pending moves to send before a network-sensitive event C++
if (CharacterMovementComponent->PawnOwner && CharacterMovementComponent->PawnOwner->IsLocallyControlled())
{
CharacterMovementComponent->FlushServerMoves();
} See Also
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?