Skip to content

Instantly share code, notes, and snippets.

@theresajayne
Created January 23, 2019 17:36
Show Gist options
  • Save theresajayne/537bb900cba7d09abfa922fe61518df2 to your computer and use it in GitHub Desktop.
Save theresajayne/537bb900cba7d09abfa922fe61518df2 to your computer and use it in GitHub Desktop.
void ABaseGameMode::EndCurrentDetailedMatchState()
{
switch (myDetailedMatchState)
{
case EMatchState::WaitingPostMatch:
RestartGame();
return;
case EMatchState::WaitingToStart:
if (ReadyToStartMatch())
StartMatch();
else
SetDetailedMatchState(EMatchState::Warmup);
return;
case EMatchState::FinishingRound:
RestartRound();
return;
case EMatchState::InRound:
FinishRound();
return;
case EMatchState::PrepareRound:
StartRound();
return;
case EMatchState::EnteringMap:
case EMatchState::LeavingMap:
case EMatchState::Invalid:
return;
default:
check(false);
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment