Struct used for network RPC parameters between client/server by ACharacter and UCharacterMovementComponent. 更多...
#include <CharacterMovementReplication.h>
Public 成员函数 | |
| virtual void | ClientFillNetworkMoveData (const FSavedMove_Character *ClientNewMove, const FSavedMove_Character *ClientPendingMove, const FSavedMove_Character *ClientOldMove) |
| Passes through calls to ClientFillNetworkMoveData on each FCharacterNetworkMoveData matching the client moves. 更多... | |
| FCharacterNetworkMoveDataContainer () | |
| Default constructor. 更多... | |
| virtual bool | Serialize (UCharacterMovementComponent &CharacterMovement, FArchive &Ar, UPackageMap *PackageMap) |
| Serialize movement data. 更多... | |
Struct used for network RPC parameters between client/server by ACharacter and UCharacterMovementComponent.
To extend network move data and add custom parameters, you typically override this struct with a custom derived struct and set the CharacterMovementComponent to use your container with UCharacterMovementComponent::SetNetworkMoveDataContainer(). Your derived struct would then typically (in the constructor) replace the NewMoveData, PendingMoveData, and OldMoveData pointers to use your own instances of a struct derived from FCharacterNetworkMoveData, where you add custom fields and implement custom serialization to be able to pack and unpack your own additional data.
|
inline |
Default constructor.
Sets data storage (NewMoveData, PendingMoveData, OldMoveData) to point to default data members. Override those pointers to instead point to custom data if you want to use derived classes.
|
virtual |
Passes through calls to ClientFillNetworkMoveData on each FCharacterNetworkMoveData matching the client moves.
Note that ClientNewMove will never be null, but others may be.
|
virtual |
Serialize movement data.
Passes Serialize calls to each FCharacterNetworkMoveData as applicable, based on bHasPendingMove and bHasOldMove.