1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add 'fly' and 'fast' privileges and the underlying privileges-to-client system

This commit is contained in:
Perttu Ahola 2012-03-31 16:23:26 +03:00
parent 96ee73f790
commit 52122c342d
18 changed files with 928 additions and 740 deletions

View file

@ -1674,6 +1674,21 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
m_sound->stopSound(client_id);
}
}
else if(command == TOCLIENT_PRIVILEGES)
{
std::string datastring((char*)&data[2], datasize-2);
std::istringstream is(datastring, std::ios_base::binary);
m_privileges.clear();
infostream<<"Client: Privileges updated: ";
u16 num_privileges = readU16(is);
for(u16 i=0; i<num_privileges; i++){
std::string priv = deSerializeString(is);
m_privileges.insert(priv);
infostream<<priv<<" ";
}
infostream<<std::endl;
}
else
{
infostream<<"Client: Ignoring unknown command "