1
0
Fork 0
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:
Loïc Blot 2017-09-27 19:47:36 +02:00 committed by GitHub
parent 50b2185ced
commit ad7daf7b52
24 changed files with 294 additions and 283 deletions

View file

@ -1218,11 +1218,7 @@ void Client::sendPlayerPos()
//infostream << "Sending Player Position information" << std::endl;
u16 our_peer_id;
{
//MutexAutoLock lock(m_con_mutex); //bulk comment-out
our_peer_id = m_con->GetPeerID();
}
session_t our_peer_id = m_con->GetPeerID();
// Set peer id if not set already
if(myplayer->peer_id == PEER_ID_INEXISTENT)
@ -1243,7 +1239,7 @@ void Client::sendPlayerItem(u16 item)
if(myplayer == NULL)
return;
u16 our_peer_id = m_con->GetPeerID();
session_t our_peer_id = m_con->GetPeerID();
// Set peer id if not set already
if(myplayer->peer_id == PEER_ID_INEXISTENT)