diff --git a/src/Components/Modules/Node.cpp b/src/Components/Modules/Node.cpp index fe1d2893..f1caf99f 100644 --- a/src/Components/Modules/Node.cpp +++ b/src/Components/Modules/Node.cpp @@ -142,6 +142,7 @@ namespace Components Proto::Node::List list; list.set_is_dedi(Dedicated::IsDedicated()); + list.set_protocol(PROTOCOL); for (auto node : Node::Nodes) { @@ -690,10 +691,11 @@ namespace Components Logger::Print("Received valid node list with %i entries from %s\n", list.address_size(), address.GetCString()); entry->isDedi = list.is_dedi(); + entry->protocol = list.protocol(); entry->state = Node::STATE_VALID; entry->lastTime = Game::Com_Milliseconds(); - if (!Dedicated::IsDedicated() && entry->isDedi && ServerList::IsOnlineList()) + if (!Dedicated::IsDedicated() && entry->isDedi && ServerList::IsOnlineList() && entry->protocol == PROTOCOL) { ServerList::InsertRequest(entry->address, true); } diff --git a/src/Components/Modules/Node.hpp b/src/Components/Modules/Node.hpp index 8556742c..3f80206f 100644 --- a/src/Components/Modules/Node.hpp +++ b/src/Components/Modules/Node.hpp @@ -46,6 +46,7 @@ namespace Components // This is only relevant for clients bool isDedi; + uint32_t protocol; }; struct ClientSession diff --git a/src/Proto/node.proto b/src/Proto/node.proto index 9be43e0e..9aec1395 100644 --- a/src/Proto/node.proto +++ b/src/Proto/node.proto @@ -14,4 +14,5 @@ message List { bool is_dedi = 1; repeated Network.Address address = 2; + uint32 protocol = 3; } diff --git a/src/STDInclude.hpp b/src/STDInclude.hpp index 89d6aff5..2171ed8f 100644 --- a/src/STDInclude.hpp +++ b/src/STDInclude.hpp @@ -60,8 +60,6 @@ #define LTC_NO_PROTOTYPES #define LTC_NO_RSA_BLINDING -#define ASIO_STANDALONE - #include #include #include