Fix WTS not working after map change

Unless this has some other purpose I'm not aware of, it's useless code which only breaks WTS and requires hud_reloadscheme to fix.
This commit is contained in:
LightyPon 2018-10-05 16:14:10 +02:00 committed by GitHub
parent 55695ef270
commit d714557da3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,14 +40,10 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_,
unsigned int panel, bool force, bool allow_force)
{
static bool textures_loaded = false;
static unsigned long panel_focus = 0;
static unsigned long panel_scope = 0;
static unsigned long panel_top = 0;
static bool cur, draw_flag = false;
static bool call_default = true;
static bool cur;
static ConVar *software_cursor = g_ICvar->FindVar("cl_software_cursor");
static const char *name;
static std::string name_s, name_stripped, reason_stripped;
#if ENABLE_VISUALS
if (!textures_loaded)
@ -175,33 +171,6 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_,
original::PaintTraverse(this_, panel, force, allow_force);
// To avoid threading problems.
if (panel == panel_top)
draw_flag = true;
if (!isHackActive())
return;
if (!panel_top)
{
name = g_IPanel->GetName(panel);
if (strlen(name) > 4)
{
if (name[0] == 'M' && name[3] == 'S')
{
panel_top = panel;
}
}
}
if (!panel_focus)
{
name = g_IPanel->GetName(panel);
if (strlen(name) > 5)
{
if (name[0] == 'F' && name[5] == 'O')
{
panel_focus = panel;
}
}
}
if (!panel_scope)
{
name = g_IPanel->GetName(panel);
@ -215,13 +184,6 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_,
g_Settings.bInvalid = true;
}
if (panel != panel_focus)
return;
g_IPanel->SetTopmostPopup(panel_focus, true);
if (!draw_flag)
return;
draw_flag = false;
if (disable_visuals)
return;