cleanup if statements?
This commit is contained in:
parent
dbc30dee6e
commit
88a6bd5887
@ -167,14 +167,18 @@ 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())
|
||||||
|
{
|
||||||
|
if (ServerList::useMasterServer) return; // don't run node frame if master server is active
|
||||||
|
|
||||||
|
if (*Game::clcState > 0)
|
||||||
{
|
{
|
||||||
wasIngame = true;
|
wasIngame = true;
|
||||||
return; // don't run while ingame because it can still cause lag spikes on lower end PCs
|
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