mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Network: offload often changed constants to source file (#15207)
* Network: offload often changed constants to source file This prevents unnecessary recompiling when using incremental builds. There is also no need to have separate max proto version variables; as they're subject to the handshake between client and server. The code is also expected to support the same version (or higher). Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
22ef4c8be1
commit
3797ca52c4
13 changed files with 92 additions and 241 deletions
|
@ -4292,12 +4292,10 @@ u16 Server::getProtocolVersionMin()
|
|||
min_proto = LATEST_PROTOCOL_VERSION;
|
||||
return rangelim(min_proto,
|
||||
SERVER_PROTOCOL_VERSION_MIN,
|
||||
SERVER_PROTOCOL_VERSION_MAX);
|
||||
LATEST_PROTOCOL_VERSION);
|
||||
}
|
||||
|
||||
u16 Server::getProtocolVersionMax()
|
||||
{
|
||||
return g_settings->getBool("strict_protocol_version_checking")
|
||||
? LATEST_PROTOCOL_VERSION
|
||||
: SERVER_PROTOCOL_VERSION_MAX;
|
||||
return LATEST_PROTOCOL_VERSION;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue