cleanup if statements?
This commit is contained in:
parent
dbc30dee6e
commit
88a6bd5887
@ -167,13 +167,17 @@ namespace Components
|
|||||||
|
|
||||||
void Node::RunFrame()
|
void Node::RunFrame()
|
||||||
{
|
{
|
||||||
if (!Dedicated::IsEnabled() && ServerList::useMasterServer) return;
|
|
||||||
if (Dedicated::IsEnabled() && Dedicated::SVLanOnly.get<bool>()) return;
|
if (Dedicated::IsEnabled() && Dedicated::SVLanOnly.get<bool>()) return;
|
||||||
|
|
||||||
if (!Dedicated::IsEnabled() && *Game::clcState > 0)
|
if (!Dedicated::IsEnabled())
|
||||||
{
|
{
|
||||||
wasIngame = true;
|
if (ServerList::useMasterServer) return; // don't run node frame if master server is active
|
||||||
return; // don't run while ingame because it can still cause lag spikes on lower end PCs
|
|
||||||
|
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
|
if (wasIngame) // our last frame we were ingame and now we aren't so touch all nodes
|
||||||
|
Loading…
Reference in New Issue
Block a user