fix(ViewPlayer): Make "never wanted" feature independent for each player (#316)
Co-authored-by: Yimura <andreas.maerten@scarlet.be>
This commit is contained in:
@ -36,6 +36,8 @@ namespace big
|
||||
[[nodiscard]] bool is_host() const;
|
||||
[[nodiscard]] bool is_valid() const;
|
||||
|
||||
bool never_wanted = false;
|
||||
|
||||
protected:
|
||||
bool equals(const CNetGamePlayer* net_game_player) const;
|
||||
|
||||
|
@ -6,6 +6,7 @@ namespace big
|
||||
class player;
|
||||
|
||||
using player_ptr = std::shared_ptr<player>;
|
||||
using player_entry = std::pair<std::string, player_ptr>;
|
||||
using players = std::map<std::string, player_ptr>;
|
||||
|
||||
class player_service final
|
||||
@ -43,6 +44,9 @@ namespace big
|
||||
players& players()
|
||||
{ return m_players; }
|
||||
|
||||
void iterate(const std::function< void(const player_entry &entry) > func)
|
||||
{ for (const auto &iter : m_players) func(iter); }
|
||||
|
||||
void set_selected(player_ptr plyr);
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user