ALimenPlayerStateBase
Overview
ALimenPlayerStateBase extends APlayerState and includes functionality to track whether the client is ready. It uses Unreal Engine's replication system to ensure that the client readiness status is synchronized across the network.
Properties
Type | Name | Access | Description |
|---|---|---|---|
bool | bIsClientReady | ReplicatedUsing=OnRep_ClientReady | Indicates whether the client is ready. |
Functions
Return Type | Signature | Description |
|---|---|---|
void | GetLifetimeReplicatedProps(TArray & OutLifetimeProps) const | Registers properties to be replicated across the network. |
bool | IsLocalPlayerState() const | Checks if this player state belongs to the local player. |
void | SetClientReady(const bool bIsReady = true) | Sets the client readiness status and notifies other clients of the change. |
bool | IsClientReady() const | Returns the current client readiness status. |
void | OnRep_ClientReady() | Called when the |
Usage & Implementation Notes
The class uses Unreal Engine's replication system to ensure that the client readiness status is synchronized across the network.
The
SetClientReadyfunction includes a check for authority, ensuring that only the server can change the client readiness status.The
OnRep_ClientReadyfunction broadcasts theOnClientReadydelegate when thebIsClientReadyproperty is replicated.