mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix server sending stuff before textures have been sent
This commit is contained in:
parent
e82a76e438
commit
cd0019acd2
2 changed files with 13 additions and 4 deletions
10
src/game.cpp
10
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"<<std::endl;
|
||||
client.getLocalInventory(local_inventory);
|
||||
|
||||
|
||||
update_wielded_item_trigger = true;
|
||||
}
|
||||
if(update_wielded_item_trigger)
|
||||
{
|
||||
update_wielded_item_trigger = false;
|
||||
// Update wielded tool
|
||||
InventoryList *mlist = local_inventory.getList("main");
|
||||
InventoryItem *item = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue