DEPRECATED_CHARACTER_MOVEMENT_RPC
#include "GameFramework/CharacterMovementReplication.h" Description
Preprocessor macro that decorates the legacy, non-packed character movement RPCs (ServerMove, ServerMoveDual, ClientAdjustPosition, etc.) with a UE_DEPRECATED_FORGAME warning pointing at the packed-movement replacement.
Caveats & Gotchas
- • It's a macro, not a real member function — it expands to a UE_DEPRECATED_FORGAME attribute placed directly above each legacy RPC declaration, so it only affects compiler warnings, not runtime behavior.
- • The functions it decorates still work at runtime as long as SUPPORT_DEPRECATED_CHARACTER_MOVEMENT_RPCS=1 is defined and p.NetUsePackedMovementRPCs is set to 0; otherwise the packed-movement path is used exclusively and the legacy RPCs are effectively dead code.
- • Defined in CharacterMovementReplication.h, not CharacterMovementComponent.h, even though every function it's applied to lives on UCharacterMovementComponent.
Signature
#define DEPRECATED_CHARACTER_MOVEMENT_RPC(DeprecatedFunction, NewFunction) UE_DEPRECATED_FORGAME(4.26, #DeprecatedFunction "() is deprecated, use " #NewFunction "() instead, or define SUPPORT_DEPRECATED_CHARACTER_MOVEMENT_RPCS=1 in the project and set CVar p.NetUsePackedMovementRPCs=0 to use the old code path.") Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DeprecatedFunction | token | Unquoted name of the legacy RPC being marked deprecated (e.g. ServerMove). | — |
| NewFunction | token | Unquoted name of the replacement packed-movement function that should be used instead. | — |
Example
How the macro is applied in the header C++
DEPRECATED_CHARACTER_MOVEMENT_RPC(ServerMove, ServerMovePacked_ClientSend)
ENGINE_API virtual void ServerMove(float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc,
uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View,
UPrimitiveComponent* ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode); See Also
Version History
Introduced in: 4.26
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?