cleanup if statements?

This commit is contained in:
m 2022-05-10 06:22:36 -05:00
parent dbc30dee6e
commit 88a6bd5887

View File

@ -167,13 +167,17 @@ namespace Components
void Node::RunFrame()
{
if (!Dedicated::IsEnabled() && ServerList::useMasterServer) return;
if (Dedicated::IsEnabled() && Dedicated::SVLanOnly.get<bool>()) return;
if (!Dedicated::IsEnabled() && *Game::clcState > 0)
if (!Dedicated::IsEnabled())
{
wasIngame = true;
return; // don't run while ingame because it can still cause lag spikes on lower end PCs
if (ServerList::useMasterServer) return; // don't run node frame if master server is active
if (*Game::clcState > 0)
{
wasIngame = true;
return; // don't run while ingame because it can still cause lag spikes on lower end PCs
}
}
if (wasIngame) // our last frame we were ingame and now we aren't so touch all nodes