HostnameManager: only trim lagcomp

no point to trim hh
This commit is contained in:
Dogan 2019-12-02 00:06:37 +01:00
parent 5c73e2a773
commit 2699dc0824

View File

@ -136,20 +136,12 @@ public void RefreshHostname()
ReplaceString(sFormattedHostname, sizeof(sFormattedHostname), "{GM}", "Zombie Escape", true);
int iLength = strlen(sFormattedHostname);
if(iLength > 55)
{
if (g_bHHLoaded && HH_IsItHappyHour()) //first trim hh if hh
ReplaceString(sFormattedHostname, sizeof(sFormattedHostname), "[HappyHour] ", "", true);
}
iLength = strlen(sFormattedHostname);
if(iLength > 55) //check if its still too long and trim LagCompensation
ReplaceString(sFormattedHostname, sizeof(sFormattedHostname), "LagCompensation | ", "", true);
if(iLength > 55) //if too long trim lagcomp
ReplaceString(sFormattedHostname, sizeof(sFormattedHostname), "LagCompensation | ", "", true);
g_cvHostname.SetString(sFormattedHostname, false, false);
}
//----------------------------------------------------------------------------------------------------
// Purpose:
//----------------------------------------------------------------------------------------------------
@ -162,4 +154,4 @@ public void OnClassesPathChange(ConVar convar, const char[] oldValue, const char
g_bNemesis = true;
else
g_bNemesis = false;
}
}