mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add session_t typedef + remove unused functions (#6470)
* Add session_t typedef + remove unused functions u16 peer_id is used everywhere, to be more consistent and permit some evolutions on this type in the future (i'm working on a PoC), uniformize u16 peer_id to SessionId peer_id
This commit is contained in:
parent
50b2185ced
commit
ad7daf7b52
24 changed files with 294 additions and 283 deletions
|
@ -405,7 +405,7 @@ ServerMap & ServerEnvironment::getServerMap()
|
|||
return *m_map;
|
||||
}
|
||||
|
||||
RemotePlayer *ServerEnvironment::getPlayer(const u16 peer_id)
|
||||
RemotePlayer *ServerEnvironment::getPlayer(const session_t peer_id)
|
||||
{
|
||||
for (RemotePlayer *player : m_players) {
|
||||
if (player->peer_id == peer_id)
|
||||
|
@ -523,7 +523,7 @@ void ServerEnvironment::savePlayer(RemotePlayer *player)
|
|||
}
|
||||
|
||||
PlayerSAO *ServerEnvironment::loadPlayer(RemotePlayer *player, bool *new_player,
|
||||
u16 peer_id, bool is_singleplayer)
|
||||
session_t peer_id, bool is_singleplayer)
|
||||
{
|
||||
PlayerSAO *playersao = new PlayerSAO(this, player, peer_id, is_singleplayer);
|
||||
// Create player if it doesn't exist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue