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:
parent
55695ef270
commit
d714557da3
@ -40,14 +40,10 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_,
|
|||||||
unsigned int panel, bool force, bool allow_force)
|
unsigned int panel, bool force, bool allow_force)
|
||||||
{
|
{
|
||||||
static bool textures_loaded = false;
|
static bool textures_loaded = false;
|
||||||
static unsigned long panel_focus = 0;
|
|
||||||
static unsigned long panel_scope = 0;
|
static unsigned long panel_scope = 0;
|
||||||
static unsigned long panel_top = 0;
|
static bool cur;
|
||||||
static bool cur, draw_flag = false;
|
|
||||||
static bool call_default = true;
|
|
||||||
static ConVar *software_cursor = g_ICvar->FindVar("cl_software_cursor");
|
static ConVar *software_cursor = g_ICvar->FindVar("cl_software_cursor");
|
||||||
static const char *name;
|
static const char *name;
|
||||||
static std::string name_s, name_stripped, reason_stripped;
|
|
||||||
|
|
||||||
#if ENABLE_VISUALS
|
#if ENABLE_VISUALS
|
||||||
if (!textures_loaded)
|
if (!textures_loaded)
|
||||||
@ -175,33 +171,6 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_,
|
|||||||
original::PaintTraverse(this_, panel, force, allow_force);
|
original::PaintTraverse(this_, panel, force, allow_force);
|
||||||
// To avoid threading problems.
|
// 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)
|
if (!panel_scope)
|
||||||
{
|
{
|
||||||
name = g_IPanel->GetName(panel);
|
name = g_IPanel->GetName(panel);
|
||||||
@ -215,13 +184,6 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_,
|
|||||||
g_Settings.bInvalid = true;
|
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)
|
if (disable_visuals)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user