Some fixes.
This commit is contained in:
parent
70d49efac5
commit
497a4ecefb
@ -353,18 +353,20 @@ 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -201,6 +201,8 @@ namespace Components
|
|||||||
for (auto &dedi : Node::Dedis)
|
for (auto &dedi : Node::Dedis)
|
||||||
{
|
{
|
||||||
if (dedi.address == address)
|
if (dedi.address == address)
|
||||||
|
{
|
||||||
|
if (dedi.state == Node::STATE_QUERYING)
|
||||||
{
|
{
|
||||||
dedi.state = (info.Get("challenge") == dedi.challenge ? Node::STATE_VALID : Node::STATE_INVALID);
|
dedi.state = (info.Get("challenge") == dedi.challenge ? Node::STATE_VALID : Node::STATE_INVALID);
|
||||||
dedi.lastTime = Game::Com_Milliseconds();
|
dedi.lastTime = Game::Com_Milliseconds();
|
||||||
@ -209,6 +211,7 @@ namespace Components
|
|||||||
{
|
{
|
||||||
Logger::Print("Validated dedi %s\n", address.GetString());
|
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