mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 21:31:46 +00:00
Refactor dedicated idling a little
This commit is contained in:
parent
8a6beee52a
commit
cfb3b45ae4
1 changed files with 12 additions and 7 deletions
|
@ -1500,18 +1500,15 @@ void NetUpdate(void)
|
|||
{
|
||||
INT32 i;
|
||||
|
||||
for (i = 1; i < MAXNETNODES; ++i)
|
||||
boolean empty = true;
|
||||
for (i = 1; i < MAXNETNODES; i++)
|
||||
if (netnodes[i].ingame)
|
||||
{
|
||||
if (dedicatedidle >= dedicatedidletime)
|
||||
{
|
||||
CONS_Printf("DEDICATED: Awakening from idle (Node %d detected...)\n", i);
|
||||
dedicatedidle = 0;
|
||||
}
|
||||
empty = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (i == MAXNETNODES)
|
||||
if (empty)
|
||||
{
|
||||
if (leveltime == 2)
|
||||
{
|
||||
|
@ -1541,6 +1538,14 @@ void NetUpdate(void)
|
|||
dedicatedidle = dedicatedidletime;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dedicatedidle >= dedicatedidletime)
|
||||
{
|
||||
CONS_Printf("DEDICATED: Awakening from idle (Node detected...)\n");
|
||||
dedicatedidle = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue