This commit is contained in:
Benau 2020-07-10 19:28:39 +08:00
parent e54bb44e44
commit bd897e390c
3 changed files with 9 additions and 1 deletions

View File

@ -189,6 +189,9 @@ The current server configuration xml looks like this:
<!-- If true this server will auto add / remove AI connected with network-ai=x, which will kick N - 1 bot(s) where N is the number of human players. Only use this for non-GP racing server. -->
<ai-handling value="false" />
<!-- If true this server will allow AI instance to be connected from anywhere. (other than LAN network only) -->
<ai-anywhere value="false" />
</server-config>
```

View File

@ -3437,7 +3437,7 @@ void ServerLobby::connectionRequested(Event* event)
ServerConfig::m_validating_player) ||
(ServerConfig::m_strict_players &&
(player_count != 1 || online_id == 0 || duplicated_ranked_player)) ||
(peer->isAIPeer() && !peer->getAddress().isLAN()) ||
(peer->isAIPeer() && !peer->getAddress().isLAN() &&!ServerConfig::m_ai_anywhere) ||
(peer->isAIPeer() &&
ServerConfig::m_ai_handling && !m_ai_peer.expired()) ||
(peer->isAIPeer() && m_game_setup->isGrandPrix()))

View File

@ -430,6 +430,11 @@ namespace ServerConfig
"network-ai=x, which will kick N - 1 bot(s) where N is the number "
"of human players. Only use this for non-GP racing server."));
SERVER_CFG_PREFIX BoolServerConfigParam m_ai_anywhere
SERVER_CFG_DEFAULT(BoolServerConfigParam(false, "ai-anywhere",
"If true this server will allow AI instance to be connected from "
"anywhere. (other than LAN network only)"));
// ========================================================================
/** Server version, will be advanced if there are protocol changes. */
static const uint32_t m_server_version = 6;