From dae46fa432fd073cc6103b3133824a18b98d3779 Mon Sep 17 00:00:00 2001 From: FutureRave Date: Thu, 27 Jan 2022 14:32:47 +0000 Subject: [PATCH] Update --- README.md | 34 +++++++++++++++--------------- src/Components/Modules/Friends.cpp | 8 +++---- src/Components/Modules/Maps.cpp | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 50ff47de..f8f64fdf 100644 --- a/README.md +++ b/README.md @@ -33,23 +33,23 @@ ## Command line arguments -| Argument | Description | -|:----------------------------|:-----------------------------------------------| -| `-tests` | Perform unit tests. | -| `-entries` | Print ff info after being loaded. | -| `-stdout` | Redirect stdout to the console. | -| `-console` | Create game's external console. | -| `-dedicated` | Enabled dedicated server. | -| `-scriptablehttp` | Enable HTTP gsc functions. | -| `-bigdumps` | Include all code sections from loaded modules. | -| `-bigminidumps` | Include all code sections from loaded modules. | -| `-reallybigminidumps` | Include data sections from all loaded modules. | -| `-dump` | Write info of loaded assets to the raw folder. | -| `-monitor` | Indicated whenever the game console is active. | -| `-nointro` | Skip game's cinematic intro. | -| `-version` | Print IW4x build info | -| `-zonebuilder` | Enable zone builder. | -| `-nosteam` | Same effect as enabling cl_anonymous dvar. | +| Argument | Description | +|:------------------------|:-----------------------------------------------| +| `-tests` | Perform unit tests. | +| `-entries` | Print to the console a list of every asset as they are loaded from zonefiles. | +| `-stdout` | Redirect all logging output to the terminal iw4x is started from, or if there is none, creates a new terminal window to write log information in. | +| `-console` | Allow the game to display its own separate interactive console window. | +| `-dedicated` | Starts the game as a headless dedicated server. | +| `-scriptablehttp` | Enable HTTP related gsc functions. | +| `-bigdumps` | Include all code sections from loaded modules in the dump. | +| `-bigminidumps` | Include all code sections from loaded modules in the dump. | +| `-reallybigminidumps` | Include data sections from all loaded modules in the dump. | +| `-dump` | Write info of loaded assets to the raw folder as they are being loaded. | +| `-monitor` | This flag is for internal use and it is used to indicate if an external console is present. | +| `-nointro` | Skip game's cinematic intro. | +| `-version` | Print IW4x build info on startup. | +| `-zonebuilder` | Start the interactive zonebuilder tool console instead of starting the game. | +| `-nosteam` | Do not update Steam about the game's current status just like an invisible mode. | ## Disclaimer diff --git a/src/Components/Modules/Friends.cpp b/src/Components/Modules/Friends.cpp index 22694931..28be3303 100644 --- a/src/Components/Modules/Friends.cpp +++ b/src/Components/Modules/Friends.cpp @@ -111,8 +111,8 @@ namespace Components Friends::SortList(); - int notify = Dvar::Var("cl_notifyFriendState").get(); - if (gotOnline && (notify == -1 || (notify == 1 && !Game::CL_IsCgameInitialized())) && !Dvar::Var("ui_streamFriendly").get()) + const auto notify = Dvar::Var("cl_notifyFriendState").get(); + if (gotOnline && (!notify || (notify && !Game::CL_IsCgameInitialized())) && !Dvar::Var("ui_streamFriendly").get()) { Game::Material* material = Friends::CreateAvatar(user); Toast::Show(material, entry->name, "is playing IW4x", 3000, [material]() @@ -578,8 +578,8 @@ namespace Components if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled() || Monitor::IsEnabled()) return; - Dvar::Register("cl_anonymous", false, Game::DVAR_FLAG_SAVED, ""); - Dvar::Register("cl_notifyFriendState", 1, -1, 1, Game::DVAR_FLAG_SAVED, ""); + Dvar::Register("cl_anonymous", false, Game::DVAR_FLAG_SAVED, "Enable invisible mode for Steam"); + Dvar::Register("cl_notifyFriendState", true, Game::DVAR_FLAG_SAVED, "Update friends about current game status"); Command::Add("addFriend", [](Command::Params* params) { diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index ed1d0bb5..a6081034 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -241,7 +241,7 @@ namespace Components { if (Flags::HasFlag("dump")) { - Utils::IO::WriteFile(Utils::String::VA("raw/%s.ents", name.data()), asset.mapEnts->entityString); + Utils::IO::WriteFile(Utils::String::VA("raw/%s.ents", name.data()), asset.mapEnts->entityString, true); } FileSystem::File ents(name + ".ents");