mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-17 17:08:39 +00:00
Move core.get_connected_players() implementation to C++
Keeping the ObjectRefs around in a table isn't ideal and this allows
removing the somewhat nonsensical is_player_connected() added in 86ef7147
.
This commit is contained in:
parent
c657fb343f
commit
0b8d3f99a5
6 changed files with 27 additions and 17 deletions
|
@ -358,6 +358,7 @@ public:
|
|||
|
||||
RemotePlayer *getPlayer(const session_t peer_id);
|
||||
RemotePlayer *getPlayer(const char* name);
|
||||
const std::vector<RemotePlayer *> getPlayers() const { return m_players; }
|
||||
u32 getPlayerCount() const { return m_players.size(); }
|
||||
|
||||
static bool migratePlayersDatabase(const GameParams &game_params,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue