mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-25 07:45:27 +01:00
Cleanup client init states by bumping protocol version
Don't use TOSERVER_RECEIVED_MEDIA but TOSERVER_CLIENT_READY as indicatio for client ready Handle clients with protocol version < 23 (almost) same way as before Make client tell server about it's version Add client state to not send bogus player position updates prior init complete Add access to statistics information (peer connction time,rtt,version) Fix clients standing stalled in world while preloading item visuals (new clients only) Add get_player_information to read client specific information from lua
This commit is contained in:
@@ -1266,7 +1266,7 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
|
||||
server->step(dtime);
|
||||
|
||||
// End condition
|
||||
if(client.connectedAndInitialized()){
|
||||
if(client.getState() == LC_Init){
|
||||
could_connect = true;
|
||||
break;
|
||||
}
|
||||
@@ -1373,7 +1373,7 @@ void the_game(bool &kill, bool random_input, InputHandler *input,
|
||||
errorstream<<wide_to_narrow(error_message)<<std::endl;
|
||||
break;
|
||||
}
|
||||
if(!client.connectedAndInitialized()){
|
||||
if(client.getState() < LC_Init){
|
||||
error_message = L"Client disconnected";
|
||||
errorstream<<wide_to_narrow(error_message)<<std::endl;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user