mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02: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:
@@ -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
|
||||
|
Reference in New Issue
Block a user