22#include <vlpi/entityIdentifier.h>
102 virtual void tick(
double dt)
override;
111 virtual void fail(
const std::string& reason);
virtual void sendOwnershipAcquireRequest()
Sends an ownership acquire request for the current entity.
bool myFadeOutStarted
Whether the fade-out animation has been started in the Complete phase.
Definition loadingPlayerState.h:186
bool myOwnershipHandlerRegistered
Whether the ownership transfer handler is currently registered.
Definition loadingPlayerState.h:224
virtual void onEnter(const DtPlayerStationStateArgs *args) override
Called when the state is entered.
virtual DtVreMessageResult handleEmbarkationDetected(DtVreMessage *message)
Handles EmbarkationDetectedMessage from DtEngagedState.
DtLoadingPlayerState(const DtLoadingPlayerState &)=delete
Deleted copy constructor.
virtual void setLoadingText(const QString &text)
Updates the loading overlay status text.
bool myPhaseWorkDone
Whether the current phase has completed its one-time work.
Definition loadingPlayerState.h:195
virtual void fail(const std::string &reason)
Handles failure by transitioning back to CHOOSE_ROLE_STATE.
virtual DtVreMessageResult handleOwnershipTransferResponse(DtVreMessage *message)
Handles the ownership transfer response message.
DtVreLoadingPlayerPage * myLoadingPlayerPage
Pointer to the loading overlay page (not owned, stored in attribute store)
Definition loadingPlayerState.h:183
bool myStationCreated
Whether the CreateStation phase has been executed this entry.
Definition loadingPlayerState.h:180
double myTimeoutRemaining
Remaining time in seconds before the overall timeout fires.
Definition loadingPlayerState.h:171
int myPhaseTickCount
Number of ticks spent in the current phase.
Definition loadingPlayerState.h:192
bool myEmbarkChainCompleted
True after chainEmbarkationLoad() has run — prevents infinite loop.
Definition loadingPlayerState.h:212
static constexpr double theDefaultTimeout
Default timeout duration in seconds.
Definition loadingPlayerState.h:174
virtual void tick(double dt) override
Updates the state each frame.
void beginLoadCycle()
Checks ownership requirements and advances to the correct initial phase.
LoadPlayerRequestMessage::LoadPolicy myLoadPolicy
Load policy read from the LoadPlayerRequestMessage on entry.
Definition loadingPlayerState.h:248
DtEntityIdentifier myDetectedEmbarkHost
DtEngagedState analyses SimulationStateMessage and forwards pre-resolved results via EmbarkationDetec...
Definition loadingPlayerState.h:206
virtual ~DtLoadingPlayerState() override
Virtual destructor.
virtual void chainEmbarkationLoad()
Restarts the loading pipeline for an embarked-host role.
unsigned long long myPendingOwnershipRequestId
Request ID for the pending ownership acquire request.
Definition loadingPlayerState.h:177
std::string myDestroyStationName
Station name of the player station to destroy before creating the new one.
Definition loadingPlayerState.h:239
DtLoadPhase myCurrentPhase
Current phase of the loading sequence.
Definition loadingPlayerState.h:168
double myEmbarkProbeWaitSeconds
Accumulated wall-clock seconds spent in the EmbarkProbe phase.
Definition loadingPlayerState.h:227
QString myLastLoadingText
Last status text set on the loading page, used to avoid redundant updates.
Definition loadingPlayerState.h:198
DtLoadingPlayerState & operator=(const DtLoadingPlayerState &)=delete
Deleted assignment operator.
bool myIsEmbarkationLoad
Whether this load was triggered by an embarkation (set via LoadPlayerRequestMessage)
Definition loadingPlayerState.h:215
virtual void advanceToPhase(DtLoadPhase nextPhase)
Advances to the next phase.
int myPostReadyTicksElapsed
Accumulated tick count in the PostReadyDelay phase.
Definition loadingPlayerState.h:189
DtEntityIdentifier myDestroyEntityId
When set, the CreateStation phase destroys this specific player station before creating the new one....
Definition loadingPlayerState.h:236
std::string myDetectedEmbarkRole
Resolved embarked-host role name detected during loading.
Definition loadingPlayerState.h:209
virtual void onExit() override
Called when the state is exited.
DtLoadingPlayerState(DtPlayerStationApp &app)
Constructor.
virtual DtVreMessageResult handleEscKey(DtVreMessage *message)
Consumes escape key presses during loading.
bool myIsEmbarkationTransition
Whether this load follows an authoritative embark or disembark update.
Definition loadingPlayerState.h:221
void resetPhaseStateForNewCycle()
Resets the per-load-cycle phase tracking fields.
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:155
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
Class for passing arguments during state transitions.
Definition playerStationState.h:47
DtPlayerStationApp & app() const
Gets a reference to the player station application.
DtPlayerStationState(DtPlayerStationApp &app, std::string stateType)
Constructor.
Loading overlay shown during player station creation.
Definition vreLoadingPlayerPage.h:39
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
LoadPolicy
LoadPolicy enumeration.
Definition loadPlayerRequest.h:38
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
!
Definition glsVreMessageUtil.h:50
DtLoadPhase
Phases that the load-player state progresses through sequentially.
Definition loadingPlayerState.h:40
@ OwnershipAcquire
Waiting for ownership transfer response (skipped if N/A)
Definition loadingPlayerState.h:42
@ PrepareDisembark
Release existing player-station roles before ownership acquisition.
Definition loadingPlayerState.h:41
@ FinishInit
Call finishInit() (connectors, PlayerCreatedMessage)
Definition loadingPlayerState.h:47
@ ComponentReadiness
Poll finalizeInitTick() on all components until ready.
Definition loadingPlayerState.h:48
@ CreateComponents
Call initializeComponents() on the player station.
Definition loadingPlayerState.h:44
@ EmbarkProbe
Check if the loaded entity is already embarked.
Definition loadingPlayerState.h:50
@ CreateStation
Create the player station via createPlayerStation()
Definition loadingPlayerState.h:43
@ PostInitComponents
Call postInitializeComponents()
Definition loadingPlayerState.h:45
@ Complete
Transition to ENGAGED_STATE.
Definition loadingPlayerState.h:51
@ InitMenus
Call initializeMenus()
Definition loadingPlayerState.h:46
@ PostReadyDelay
Artificial delay after all components are ready.
Definition loadingPlayerState.h:49
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Defines base classes for the VR-Engage state management system.
Defines the base class for all VREngage messages.