Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/GameFramework/CharacterMovementComponent.h |
Include |
#include "GameFramework/CharacterMovementComponent.h" |
Source |
/Engine/Source/Runtime/Engine/Private/Components/CharacterMovementComponent.cpp |
void ServerMovePacked_ClientSend
(
const FCharacterServerMovePackedBits & PackedBits
)
The actual network RPCs for character movement are passed to ACharacter, which wrap to the _Implementation call here, to avoid Component RPC overhead. For example: Client: UCharacterMovementComponent::ServerMovePacked_ClientSend() => Calls CharacterOwner->ServerMove() triggering RPC on the server. Server: ACharacter::ServerMovePacked_Implementation() from the RPC => Calls CharacterMovement->ServerMove_ServerReceive(), unpacked and sent to ServerMove_ServerHandleMoveData().
ServerMove_ClientSend() and ServerMove_ServerReceive() use a bitstream created from the current FCharacterNetworkMoveData data container that contains the client move. See GetNetworkMoveDataContainer()/SetNetworkMoveDataContainer() for details on setting a custom container with custom unpacking through FCharacterNetworkMoveData::Serialize(). Wrapper to send packed move data to the server, through the Character.