diff --git a/README.md b/README.md index bddb8f83..4c4cabc4 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,12 @@ | `-nointro` | Skip game's cinematic intro. | | `-version` | Print IW4x build info on startup. | | `-nosteam` | Disable friends feature and do not update Steam about the game's current status just like an invisible mode. | +| `-lan` | Disable node system for the client/server and disable sending heartbeats to the master server. | | `-unprotect-dvars` | Allow the server to modify saved/archive dvars. | | `-zonebuilder` | Start the interactive zonebuilder tool console instead of starting the game. | -| `-disable-notifies` | Disable "Anti-CFG" checks | -| `-disable-mongoose` | Disable Mongoose HTTP server | -| `-disable-rate-limit-check` | Disable RCon rate limit checks | +| `-disable-notifies` | Disable "Anti-CFG" checks. | +| `-disable-mongoose` | Disable Mongoose HTTP server. | +| `-disable-rate-limit-check` | Disable RCon rate limit checks. | ## Disclaimer diff --git a/src/Components/Modules/Dedicated.cpp b/src/Components/Modules/Dedicated.cpp index a5748d8a..0fb43896 100644 --- a/src/Components/Modules/Dedicated.cpp +++ b/src/Components/Modules/Dedicated.cpp @@ -163,7 +163,7 @@ namespace Components void Dedicated::Heartbeat() { // Do not send a heartbeat if sv_lanOnly is set to true - if (SVLanOnly.get()) + if (SVLanOnly.get() || Flags::HasFlag("lan")) { return; } diff --git a/src/Components/Modules/Node.cpp b/src/Components/Modules/Node.cpp index 898f5b85..74a0baee 100644 --- a/src/Components/Modules/Node.cpp +++ b/src/Components/Modules/Node.cpp @@ -397,10 +397,11 @@ namespace Components Node::Node() { - if (ZoneBuilder::IsEnabled()) - { - return; - } + if (ZoneBuilder::IsEnabled()) return; + + if (Flags::HasFlag("lan")) return; + + if (Dedicated::IsEnabled() && Dedicated::SVLanOnly.get()) return; net_natFix = Game::Dvar_RegisterBool("net_natFix", false, 0, "Fix node registration for certain firewalls/routers");