From ca8e11b18c243d46cce653cfc365a1747329f9be Mon Sep 17 00:00:00 2001 From: Kai Philipp Date: Wed, 11 Sep 2019 03:50:31 +0200 Subject: [PATCH] session iteration --- src/net/common/servergame.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/net/common/servergame.cpp b/src/net/common/servergame.cpp index 73ae5201..2ed69024 100644 --- a/src/net/common/servergame.cpp +++ b/src/net/common/servergame.cpp @@ -457,9 +457,10 @@ ServerGame::StoreLastGames() RankingMap::const_iterator i = m_rankingMap.begin(); RankingMap::const_iterator end = m_rankingMap.end(); + boost::shared_ptr tmpSession; while (i != end) { LOG_ERROR("iterating m_rankingMap ... userId " << (*i).second.dbid); - boost::shared_ptr tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid); + tmpSession = GetSessionManager().GetSessionByUniquePlayerId((*i).second.dbid); if(tmpSession){ tmpSession->GetPlayerData()->AddPlayerLastGame((long)time(NULL)); LOG_ERROR("TimeStamp stored: " << tmpSession->GetPlayerData()->GetPlayerLastGames().back());