Nothing special

This commit is contained in:
momo5502 2016-05-14 02:00:04 +02:00
parent 49e92228e7
commit 1842366f56
5 changed files with 12 additions and 8 deletions

2
deps/json11 vendored

@ -1 +1 @@
Subproject commit 3ae180068db774650c9f39041764bc99a00c868e Subproject commit 8452587160c5e767cbc2cd49453f03a2e38c50d2

2
deps/protobuf vendored

@ -1 +1 @@
Subproject commit ca9bbd71d547a05604e8c2bddda66cdba5abe0c4 Subproject commit dc4970684ab8b76795cfb2a1e6bdbf54b79848f2

View File

@ -63,7 +63,7 @@ namespace Components
while (*in != 0 && current < max) while (*in != 0 && current < max)
{ {
char index = *(in + 1); char index = *(in + 1);
if (*in == '^' && (Colors::ColorIndex(index) != 7 || index == '7')) // Add 1 new color for now if (*in == '^' && (Colors::ColorIndex(index) != 7 || index == '7'))
{ {
in++; in++;
} }

View File

@ -289,7 +289,7 @@ namespace Components
// Well, it might be possible that this node doesn't know use anymore. Anyways, just keep that code here... // Well, it might be possible that this node doesn't know use anymore. Anyways, just keep that code here...
// Nvm, this is required for clients, as nodes don't send registration requests to clients. // Nvm, this is required for clients, as nodes don't send registration requests to clients.
else if (node.state == STATE_INVALID && (Game::Com_Milliseconds() - node.lastTime) >(NODE_QUERY_INTERVAL)) else if (node.state == STATE_INVALID && (Game::Com_Milliseconds() - node.lastTime) > NODE_QUERY_INTERVAL)
{ {
registerCount++; registerCount++;
Node::PerformRegistration(node.address); Node::PerformRegistration(node.address);
@ -317,6 +317,10 @@ namespace Components
} }
} }
static int lastCheck = 0;
if ((Game::Com_Milliseconds() - lastCheck) < 1000) return;
lastCheck = Game::Com_Milliseconds();
Node::DeleteInvalidSessions(); Node::DeleteInvalidSessions();
Node::DeleteInvalidNodes(); Node::DeleteInvalidNodes();
Node::StoreNodes(false); Node::StoreNodes(false);

View File

@ -59,7 +59,7 @@ namespace Utils
return !(*this == token); return !(*this == token);
} }
bool operator< (const Token& token) const bool operator<(const Token& token) const
{ {
if (*this == token) if (*this == token)
{ {
@ -90,17 +90,17 @@ namespace Utils
return false; return false;
} }
bool operator> (const Token& token) const bool operator>(const Token& token) const
{ {
return (token < *this && *this != token); return (token < *this && *this != token);
} }
bool operator<= (const Token& token) const bool operator<=(const Token& token) const
{ {
return !(*this > token); return !(*this > token);
} }
bool operator>= (const Token& token) const bool operator>=(const Token& token) const
{ {
return !(*this < token); return !(*this < token);
} }