Include protocol in nodes
This commit is contained in:
parent
9c8904d561
commit
66671fa817
@ -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);
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ namespace Components
|
||||
|
||||
// This is only relevant for clients
|
||||
bool isDedi;
|
||||
uint32_t protocol;
|
||||
};
|
||||
|
||||
struct ClientSession
|
||||
|
@ -14,4 +14,5 @@ message List
|
||||
{
|
||||
bool is_dedi = 1;
|
||||
repeated Network.Address address = 2;
|
||||
uint32 protocol = 3;
|
||||
}
|
||||
|
@ -60,8 +60,6 @@
|
||||
#define LTC_NO_PROTOTYPES
|
||||
#define LTC_NO_RSA_BLINDING
|
||||
|
||||
#define ASIO_STANDALONE
|
||||
|
||||
#include <zlib.h>
|
||||
#include <curses.h>
|
||||
#include <mongoose.h>
|
||||
|
Loading…
Reference in New Issue
Block a user