Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added -lan flag #95

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/Components/Modules/Dedicated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ namespace Components
void Dedicated::Heartbeat()
{
// Do not send a heartbeat if sv_lanOnly is set to true
if (SVLanOnly.get<bool>())
if (SVLanOnly.get<bool>() || Flags::HasFlag("lan"))
{
return;
}
Expand Down
9 changes: 5 additions & 4 deletions src/Components/Modules/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>()) return;

net_natFix = Game::Dvar_RegisterBool("net_natFix", false, 0, "Fix node registration for certain firewalls/routers");

Expand Down