From: Perttu Ahola Date: Mon, 2 Jan 2012 15:44:00 +0000 (+0200) Subject: Fix server sending stuff before textures have been sent X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=cd0019acd28bf7d2b6de44fc366804f0d17c80b2;p=zefram%2Fminetest%2Fminetest_engine.git Fix server sending stuff before textures have been sent --- diff --git a/src/game.cpp b/src/game.cpp index 13d1e0c7..0d08074a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1011,6 +1011,7 @@ void the_game( bool invert_mouse = g_settings->getBool("invert_mouse"); bool respawn_menu_active = false; + bool update_wielded_item_trigger = false; bool show_profiler = false; bool force_fog_off = false; @@ -1663,6 +1664,8 @@ void the_game( else if(event.type == CE_TEXTURES_UPDATED) { update_skybox(driver, tsrc, smgr, skybox, brightness); + + update_wielded_item_trigger = true; } } } @@ -2274,7 +2277,12 @@ void the_game( { //infostream<<"Updating local inventory"<definitions_sent = true; - // Send information about server to player in chat SendChatMessage(peer_id, getStatusString()); @@ -2849,6 +2846,10 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) } SendTexturesRequested(peer_id, tosend); + + // Now the client should know about everything + // (definitions and textures) + getClient(peer_id)->definitions_sent = true; } else if(command == TOSERVER_INTERACT) {