fixed highscores
This commit is contained in:
@ -1406,11 +1406,14 @@ void ApplicationManager::setupStateHandlers() {
|
||||
if (m_stateContext.game->isGameOver()) {
|
||||
// Submit score before transitioning
|
||||
if (m_stateContext.scores) {
|
||||
std::string gt = (m_stateContext.game->getMode() == GameMode::Challenge) ? "challenge" : "classic";
|
||||
m_stateContext.scores->submit(
|
||||
m_stateContext.game->score(),
|
||||
m_stateContext.game->lines(),
|
||||
m_stateContext.game->level(),
|
||||
m_stateContext.game->elapsed()
|
||||
m_stateContext.game->elapsed(),
|
||||
std::string("PLAYER"),
|
||||
gt
|
||||
);
|
||||
}
|
||||
m_stateManager->setState(AppState::GameOver);
|
||||
|
||||
Reference in New Issue
Block a user