From d4b3f75b22c01b878d3f50c121417d7a171fbc03 Mon Sep 17 00:00:00 2001 From: Benau Date: Tue, 15 May 2018 16:08:07 +0800 Subject: [PATCH] Add code for alayan --- src/network/game_setup.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/network/game_setup.hpp b/src/network/game_setup.hpp index 54ede216e..038e673fa 100644 --- a/src/network/game_setup.hpp +++ b/src/network/game_setup.hpp @@ -80,7 +80,7 @@ public: /** \brief Get the players that are in the game * \return A vector containing pointers on the players profiles. */ std::vector > - getConnectedPlayers() const + getConnectedPlayers(bool same_index_for_disconnected = false) const { std::lock_guard lock(m_players_mutex); std::vector > players; @@ -88,6 +88,8 @@ public: { if (auto player_connected = player_weak.lock()) players.push_back(player_connected); + else if (same_index_for_disconnected) + players.push_back(nullptr); } return players; } // getConnectedPlayers