Hello i was just wondering.
Can anyone please explain this statement for me?
I dont get whats happening there.
MyGameState is a class and then a bool type the use is totaly new to me.
The full code looks like this.
Edit: My bad its a pointer 
Thanks for any explination.
Can anyone please explain this statement for me?
Code:
const bool bMatchIsOver = MyGameState && MyGameState->bMatchIsOver;
MyGameState is a class and then a bool type the use is totaly new to me.
The full code looks like this.
Code:
/** Accept or reject a player attempting to join the server. * Fails login if you set the ErrorMessage to a non-empty string. */ void AShooterGameMode::PreLogin(const FString& Options, const FString& Address, const TSharedPtr<FUniqueNetId>& UniqueId, FString& ErrorMessage) { Super::PreLogin(Options, Address, UniqueId, ErrorMessage); AShooterGameState* const MyGameState = Cast<AShooterGameState>(GameState); const bool bMatchIsOver = MyGameState && MyGameState->bMatchIsOver; const FString EndGameError = TEXT("Match is over!"); ErrorMessage = bMatchIsOver ? *EndGameError : GameSession->ApproveLogin(Options); }

Thanks for any explination.
Comment