Light cleanup

This commit is contained in:
Kawe Mazidjatari 2022-08-29 14:00:54 +02:00
parent ab8fc757c8
commit e54c2df621
5 changed files with 7 additions and 14 deletions

View File

@ -24,7 +24,7 @@ void CEngineSDK::FixedFrame()
g_pConsole->Think();
#endif // !DEDICATED
std::chrono::duration<float, std::deci> interval{ sdk_fixedframe_tickinterval->GetFloat()};
std::chrono::duration<float> interval{ sdk_fixedframe_tickinterval->GetFloat()};
std::this_thread::sleep_for(interval);
}
}

View File

@ -97,11 +97,8 @@ CClient* CServer::Authenticate(CServer* pServer, user_creds_s* pInpacket)
if (g_bCheckCompBanDB)
{
if (g_pMasterServer)
{
std::thread th(SV_IsClientBanned, g_pMasterServer, svIpAddress, pInpacket->m_nNucleusID);
th.detach();
}
std::thread th(SV_IsClientBanned, g_pMasterServer, svIpAddress, pInpacket->m_nNucleusID);
th.detach();
}
return v_CServer_Authenticate(pServer, pInpacket);

View File

@ -17,7 +17,6 @@ History:
#include "tier0/fasttimer.h"
#include "tier0/frametask.h"
#include "tier0/commandline.h"
#include "tier1/IConVar.h"
#include "tier1/cvar.h"
#include "windows/id3dx.h"
#include "windows/console.h"
@ -47,9 +46,6 @@ CBrowser::CBrowser(void)
std::thread refresh(&CBrowser::RefreshServerList, this);
refresh.detach();
std::thread think(&CBrowser::Think, this);
think.detach(); // !FIXME: Run from SDK MainFrame when finished.
m_pszBrowserTitle = "Server Browser";
m_rLockedIconBlob = GetModuleResource(IDB_PNG2);
}
@ -151,7 +147,7 @@ void CBrowser::Think(void)
{
if (m_flFadeAlpha <= 1.f)
{
m_flFadeAlpha += .05f;
m_flFadeAlpha += .1f;
}
}
else // Reset to full transparent.
@ -339,7 +335,7 @@ void CBrowser::HiddenServersModal(void)
ImGui::PopStyleColor(); // Pop the override for the child bg.
ImGui::SameLine();
ImGui::Text("Enter the token to connect");
ImGui::Text("Enter token to connect");
ImGui::PushItemWidth(ImGui::GetWindowContentRegionWidth()); // Override item width.
ImGui::InputTextWithHint("##HiddenServersConnectModal_TokenInput", "Token", &m_svHiddenServerToken);

View File

@ -151,7 +151,7 @@ void CConsole::Think(void)
{
if (m_flFadeAlpha <= 1.f)
{
m_flFadeAlpha += .05f;
m_flFadeAlpha += .1f;
}
}
else // Reset to full transparent.

View File

@ -66,7 +66,7 @@ void ConVar::Init(void) const
//-------------------------------------------------------------------------
// ENGINE |
hostdesc = ConVar::Create("hostdesc", "", FCVAR_RELEASE, "Host game server description.", false, 0.f, false, 0.f, nullptr, nullptr);
sdk_fixedframe_tickinterval = ConVar::Create("sdk_fixedframe_tickinterval", "0.05", FCVAR_RELEASE, "The tick interval used by the SDK fixed frame.", false, 0.f, false, 0.f, nullptr, nullptr);
sdk_fixedframe_tickinterval = ConVar::Create("sdk_fixedframe_tickinterval", "0.02", FCVAR_RELEASE, "The tick interval used by the SDK fixed frame.", false, 0.f, false, 0.f, nullptr, nullptr);
staticProp_defaultBuildFrustum = ConVar::Create("staticProp_defaultBuildFrustum", "0", FCVAR_DEVELOPMENTONLY, "Use the old solution for building static prop frustum culling.", false, 0.f, false, 0.f, nullptr, nullptr);
cm_unset_all_cmdquery = ConVar::Create("cm_unset_all_cmdquery" , "0", FCVAR_DEVELOPMENTONLY | FCVAR_REPLICATED, "Returns false on every ConVar/ConCommand query ( !warning! ).", false, 0.f, false, 0.f, nullptr, nullptr);