diff --git a/src/guiengine/engine.cpp b/src/guiengine/engine.cpp index 475490a66..4c1f3316c 100644 --- a/src/guiengine/engine.cpp +++ b/src/guiengine/engine.cpp @@ -1360,6 +1360,12 @@ namespace GUIEngine std::vector g_loading_icons; core::stringw g_tips_string; + void clearLoadingTips() + { + g_tips_string = L""; + } + + // ----------------------------------------------------------------------- void renderLoading(bool clearIcons, bool launching, bool update_tips) { #ifndef SERVER_ONLY @@ -1418,11 +1424,15 @@ namespace GUIEngine true/* center h */, false /* center v */ ); // Draw a tip during loading - core::rect tipRect(core::position2d(0, y_from - text_height), - core::dimension2d(screen_w, text_height)); - GL32_draw2DRectangle(Skin::getColor("tips_background::neutral"), tipRect); - Private::g_font->draw(g_tips_string.c_str(), tipRect, Skin::getColor("brighttext::neutral"), - true /* hcenter */, true /* vcenter */); + if (!g_tips_string.empty()) + { + core::rect tipRect(core::position2d(0, y_from - text_height), + core::dimension2d(screen_w, text_height)); + GL32_draw2DRectangle(Skin::getColor("tips_background::neutral"), tipRect); + Private::g_font->draw(g_tips_string, tipRect, + Skin::getColor("brighttext::neutral"), + true /* hcenter */, true /* vcenter */); + } const int icon_count = (int)g_loading_icons.size(); const int icon_size = (int)(std::min(screen_w, screen_h) / 12.0f); diff --git a/src/guiengine/engine.hpp b/src/guiengine/engine.hpp index 9ac009cf7..9f4296114 100644 --- a/src/guiengine/engine.hpp +++ b/src/guiengine/engine.hpp @@ -231,6 +231,8 @@ namespace GUIEngine */ void render(float dt, bool is_loading = false); + void clearLoadingTips(); + /** \brief renders a "loading" screen */ void renderLoading(bool clearIcons = true, bool launching = false, bool update_tips = true); diff --git a/src/race/race_manager.cpp b/src/race/race_manager.cpp index b991bcb3f..7ef3b1575 100644 --- a/src/race/race_manager.cpp +++ b/src/race/race_manager.cpp @@ -484,7 +484,8 @@ void RaceManager::startNextRace() // sfx_manager->dump(); IrrlichtDevice* device = irr_driver->getDevice(); - GUIEngine::renderLoading(); + GUIEngine::clearLoadingTips(); + GUIEngine::renderLoading(true/*clearIcons*/, false/*launching*/, false/*update_tips*/); device->getVideoDriver()->endScene(); device->getVideoDriver()->beginScene(true, true, video::SColor(255,100,101,140)); diff --git a/src/states_screens/race_result_gui.cpp b/src/states_screens/race_result_gui.cpp index 2377c6b46..36d65daeb 100644 --- a/src/states_screens/race_result_gui.cpp +++ b/src/states_screens/race_result_gui.cpp @@ -145,7 +145,7 @@ void RaceResultGUI::init() } #ifndef SERVER_ONLY - if (!NetworkConfig::get()->isNetworking()) + if (!human_win && !NetworkConfig::get()->isNetworking()) { core::stringw tips_string = _("Tip: "); tips_string += TipsManager::get()->getTip("race");