diff --git a/src/net/common/servergame.cpp b/src/net/common/servergame.cpp index 9b14f770..6ee308c8 100644 --- a/src/net/common/servergame.cpp +++ b/src/net/common/servergame.cpp @@ -349,8 +349,8 @@ ServerGame::InternalStartGame() InitRankingMap(playerData); // @TODO: here to save lastGames with mysql per player + //if (GetGameData().gameType == GAME_TYPE_RANKING) - LOG_ERROR("before StoreLastGames()."); if(true) StoreLastGames(); } @@ -457,16 +457,14 @@ ServerGame::StoreLastGames() RankingMap::const_iterator i = m_rankingMap.begin(); RankingMap::const_iterator end = m_rankingMap.end(); -LOG_ERROR("StoreLastGames() entered."); while (i != end) { -LOG_ERROR("iterating m_rankingMap ... userId " << (*i).second.dbid); + LOG_ERROR("iterating m_rankingMap ... userId " << (*i).second.dbid); boost::shared_ptr tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid); if(tmpSession){ + tmpSession->GetPlayerData()->AddPlayerLastGame((long)time(NULL)); + LOG_ERROR("TimeStamp stored: " << tmpSession->GetPlayerData()->GetPlayerLastGames().back()); std::vector lastGames = tmpSession->GetPlayerData()->GetPlayerLastGames(); - - //if(lastGames.size() > 0) - //GetLobbyThread().GetDatabase().SetGamePlayerPlace(GetId(), (*i).second.dbid, lastGames); - LOG_ERROR("last timeStamp" << lastGames.back() << "."); + LOG_ERROR("Ready for storing vector: " << lastGames.back()); } ++i; } diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 40e69fd0..9775e212 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1438,9 +1438,6 @@ ServerLobbyThread::HandleNetPacketJoinGame(boost::shared_ptr sessio // ){ // SendJoinGameFailed(session, joinGame.gameid(), NTF_NET_JOIN_IP_BLOCKED); } else { - // @FIXME: debug only - final position is gamestart - session->GetPlayerData()->AddPlayerLastGame((long)time(NULL)); - LOG_ERROR("TimeStamp stored: " << session->GetPlayerData()->GetPlayerLastGames().back()); MoveSessionToGame(game, session, joinGame.autoleave(), false); } }