From fc614ca5ec1af4995984015edcac844ebb967cbf Mon Sep 17 00:00:00 2001 From: Kai Philipp Date: Tue, 10 Sep 2019 21:45:54 +0200 Subject: [PATCH] debugging --- src/net/common/servergame.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/net/common/servergame.cpp b/src/net/common/servergame.cpp index 88bcdd58..530002b4 100644 --- a/src/net/common/servergame.cpp +++ b/src/net/common/servergame.cpp @@ -345,15 +345,14 @@ ServerGame::InternalStartGame() GuiInterface &gui = GetGui(); m_game.reset(new Game(&gui, factory, playerData, GetGameData(), GetStartData(), GetNextGameNum(), NULL)); + GetDatabase().AsyncCreateGame(GetId(), GetName()); + InitRankingMap(playerData); + // @TODO: here to save lastGames with mysql per player //if (GetGameData().gameType == GAME_TYPE_RANKING) LOG_ERROR("before StoreLastGames()."); if(true) StoreLastGames(); - - - GetDatabase().AsyncCreateGame(GetId(), GetName()); - InitRankingMap(playerData); } LOG_VERBOSE("before return."); return playerData; @@ -469,7 +468,7 @@ LOG_ERROR("iterating m_rankingMap ... userId " << (*i).second.dbid); if(lastGames.size() > 0) //GetLobbyThread().GetDatabase().SetGamePlayerPlace(GetId(), (*i).second.dbid, lastGames); - LOG_ERROR("last timeStamp" << *lastGames.end() << "."); + LOG_ERROR("last timeStamp" << *lastGames.back() << "."); } ++i; }