RealDocs

DEPRECATED_CHARACTER_MOVEMENT_RPC

function Engine Deprecated Since 4.26
Deprecated: Use ServerMovePacked() / ClientMoveResponsePacked() instead, or define SUPPORT_DEPRECATED_CHARACTER_MOVEMENT_RPCS=1.
#include "GameFramework/CharacterMovementReplication.h"
Access: public Specifiers: deprecated

Description

Macro that annotates legacy character movement RPC functions (ServerMove, ServerMoveDual, ClientAdjustPosition, etc.) with a UE_DEPRECATED_FORGAME warning pointing to the packed equivalents (ServerMovePacked, ClientMoveResponsePacked). Expands to an empty statement in release builds unless SUPPORT_DEPRECATED_CHARACTER_MOVEMENT_RPCS is defined.

Caveats & Gotchas

  • The deprecated RPCs still exist in the engine but require defining SUPPORT_DEPRECATED_CHARACTER_MOVEMENT_RPCS=1 and setting CVar p.NetUsePackedMovementRPCs=0 to re-enable them at runtime. Without both, the functions compile but are never invoked by CharacterMovement.
  • Migrating to ServerMovePacked/ClientMoveResponsePacked changes the network protocol — old clients cannot talk to updated servers using the packed RPCs, so coordinated version bumps are required in shipped multiplayer titles.

Signature

DEPRECATED_CHARACTER_MOVEMENT_RPC(DeprecatedFunction, NewFunction)

Parameters

Name Type Description Default
DeprecatedFunction identifier The old RPC function name being deprecated.
NewFunction identifier The replacement packed RPC function name.

Example

How the macro appears in Character.h C++
// From Character.h — the macro marks the old RPC before its declaration:
DEPRECATED_CHARACTER_MOVEMENT_RPC(ServerMove, ServerMovePacked)
UFUNCTION(unreliable, server, WithValidation)
ENGINE_API void ServerMove(float TimeStamp, ...);

// The replacement to use instead:
UFUNCTION(unreliable, server, WithValidation)
ENGINE_API void ServerMovePacked(const FCharacterServerMovePackedBits& PackedBits);

Version History

Introduced in: 4.26

Version Status Notes
5.6 stable
4.26 stable Macro introduced; old RPC path deprecated in favour of packed RPCs.

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.