Some fixes.
This commit is contained in:
parent
70d49efac5
commit
497a4ecefb
@ -353,17 +353,19 @@ namespace Components
|
|||||||
|
|
||||||
wattron(Console::OutputWindow, COLOR_PAIR(9));
|
wattron(Console::OutputWindow, COLOR_PAIR(9));
|
||||||
|
|
||||||
int currentTime = static_cast<int>(GetTickCount64()); // Make our compiler happy
|
// int currentTime = static_cast<int>(GetTickCount64()); // Make our compiler happy
|
||||||
|
//
|
||||||
|
// if (!Console::HasConsole)
|
||||||
|
// {
|
||||||
|
// Console::RefreshOutput();
|
||||||
|
// }
|
||||||
|
// else if ((currentTime - Console::LastRefresh) > 100)
|
||||||
|
// {
|
||||||
|
// Console::RefreshOutput();
|
||||||
|
// Console::LastRefresh = currentTime;
|
||||||
|
// }
|
||||||
|
|
||||||
if (!Console::HasConsole)
|
Console::RefreshOutput();
|
||||||
{
|
|
||||||
Console::RefreshOutput();
|
|
||||||
}
|
|
||||||
else if ((currentTime - Console::LastRefresh) > 100)
|
|
||||||
{
|
|
||||||
Console::RefreshOutput();
|
|
||||||
Console::LastRefresh = currentTime;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Console::Console()
|
Console::Console()
|
||||||
|
@ -231,6 +231,8 @@ namespace Components
|
|||||||
// Post initialization point
|
// Post initialization point
|
||||||
Utils::Hook(0x60BFBF, Dedicated::PostInitializationStub, HOOK_JUMP).Install()->Quick();
|
Utils::Hook(0x60BFBF, Dedicated::PostInitializationStub, HOOK_JUMP).Install()->Quick();
|
||||||
|
|
||||||
|
#ifdef USE_LEGACY_SERVER_LIST
|
||||||
|
|
||||||
// Heartbeats
|
// Heartbeats
|
||||||
Dedicated::OnFrame([] ()
|
Dedicated::OnFrame([] ()
|
||||||
{
|
{
|
||||||
@ -242,6 +244,7 @@ namespace Components
|
|||||||
Dedicated::Heartbeat();
|
Dedicated::Heartbeat();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,12 +202,15 @@ namespace Components
|
|||||||
{
|
{
|
||||||
if (dedi.address == address)
|
if (dedi.address == address)
|
||||||
{
|
{
|
||||||
dedi.state = (info.Get("challenge") == dedi.challenge ? Node::STATE_VALID : Node::STATE_INVALID);
|
if (dedi.state == Node::STATE_QUERYING)
|
||||||
dedi.lastTime = Game::Com_Milliseconds();
|
|
||||||
|
|
||||||
if (dedi.state == Node::STATE_VALID)
|
|
||||||
{
|
{
|
||||||
Logger::Print("Validated dedi %s\n", address.GetString());
|
dedi.state = (info.Get("challenge") == dedi.challenge ? Node::STATE_VALID : Node::STATE_INVALID);
|
||||||
|
dedi.lastTime = Game::Com_Milliseconds();
|
||||||
|
|
||||||
|
if (dedi.state == Node::STATE_VALID)
|
||||||
|
{
|
||||||
|
Logger::Print("Validated dedi %s\n", address.GetString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -415,6 +418,10 @@ namespace Components
|
|||||||
|
|
||||||
Node::SendNodeList(address);
|
Node::SendNodeList(address);
|
||||||
Node::SendDediList(address);
|
Node::SendDediList(address);
|
||||||
|
|
||||||
|
// Send our heartbeat as well :P
|
||||||
|
// Otherwise, if there's only 1 node in the network (us), we might not get listed as dedi
|
||||||
|
Network::Send(address, "heartbeat\n");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user