maint: update number of max servers per game
This commit is contained in:
parent
42b5e31bbc
commit
fa24128787
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@ -21,6 +21,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
configuration:
|
configuration:
|
||||||
|
- Debug
|
||||||
- Release
|
- Release
|
||||||
arch:
|
arch:
|
||||||
- x64
|
- x64
|
||||||
@ -68,10 +69,13 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
configuration:
|
configuration:
|
||||||
|
- Debug
|
||||||
- Release
|
- Release
|
||||||
arch:
|
arch:
|
||||||
- x64
|
- x64
|
||||||
include:
|
include:
|
||||||
|
- configuration: Debug
|
||||||
|
config: debug
|
||||||
- configuration: Release
|
- configuration: Release
|
||||||
config: release
|
config: release
|
||||||
steps:
|
steps:
|
||||||
@ -122,11 +126,14 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
configuration:
|
configuration:
|
||||||
|
- Debug
|
||||||
- Release
|
- Release
|
||||||
arch:
|
arch:
|
||||||
- x64
|
- x64
|
||||||
- arm64
|
- arm64
|
||||||
include:
|
include:
|
||||||
|
- configuration: Debug
|
||||||
|
config: debug
|
||||||
- configuration: Release
|
- configuration: Release
|
||||||
config: release
|
config: release
|
||||||
- arch: x64
|
- arch: x64
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
constexpr auto T7_PROTOCOL = 7;
|
constexpr auto T7_PROTOCOL = 7;
|
||||||
|
|
||||||
constexpr size_t MAX_SERVERS_PER_GAME = 15;
|
constexpr size_t MAX_SERVERS_PER_GAME = 10;
|
||||||
|
|
||||||
void elimination_handler::run_frame()
|
void elimination_handler::run_frame()
|
||||||
{
|
{
|
||||||
@ -29,8 +29,8 @@ void elimination_handler::run_frame()
|
|||||||
if (server.game == game_type::t7 && server.protocol < T7_PROTOCOL)
|
if (server.game == game_type::t7 && server.protocol < T7_PROTOCOL)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
console::info("Removing T7 server '%s' because protocol %i is less than %i\n",
|
console::log("Removing T7 server '%s' because they are using an outdated protocol (%i)\n",
|
||||||
context.get_address().to_string().data(), server.protocol, T7_PROTOCOL);
|
context.get_address().to_string().data(), server.protocol);
|
||||||
#endif
|
#endif
|
||||||
context.remove();
|
context.remove();
|
||||||
}
|
}
|
||||||
@ -38,10 +38,8 @@ void elimination_handler::run_frame()
|
|||||||
++server_count[server.game][context.get_address()];
|
++server_count[server.game][context.get_address()];
|
||||||
if (server_count[server.game][context.get_address()] >= MAX_SERVERS_PER_GAME)
|
if (server_count[server.game][context.get_address()] >= MAX_SERVERS_PER_GAME)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
console::log("Removing server '%s' because it exceeds MAX_SERVERS_PER_GAME\n",
|
||||||
console::info("Removing server '%s' because it exceeds MAX_SERVERS_PER_GAME\n",
|
|
||||||
context.get_address().to_string().data());
|
context.get_address().to_string().data());
|
||||||
#endif
|
|
||||||
context.remove();
|
context.remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user