From ad7daf7b52348e1b71aa803be10de5b2134cba11 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Wed, 27 Sep 2017 19:47:36 +0200 Subject: 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 --- src/serverenvironment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/serverenvironment.cpp') diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp index a5f307554..e20d58673 100644 --- a/src/serverenvironment.cpp +++ b/src/serverenvironment.cpp @@ -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 -- cgit v1.2.3