From 30d8e6dbfe75db47cf396aa909f43c24c4dbe127 Mon Sep 17 00:00:00 2001 From: Fernando Rocha <34967844+Fernando-A-Rocha@users.noreply.github.com> Date: Fri, 18 Oct 2024 20:58:02 +0100 Subject: [PATCH 01/16] Fix Console (F8) not maintaining position & size when GUI Skin changed (#3803) --- Client/core/CGUI.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Client/core/CGUI.cpp b/Client/core/CGUI.cpp index c4a2729d7a..6273536347 100644 --- a/Client/core/CGUI.cpp +++ b/Client/core/CGUI.cpp @@ -56,9 +56,15 @@ CLocalGUI::~CLocalGUI() void CLocalGUI::SetSkin(const char* szName) { + CVector2D consolePos, consoleSize; + bool guiWasLoaded = m_pMainMenu != NULL; if (guiWasLoaded) + { + consolePos = m_pConsole->GetPosition(); + consoleSize = m_pConsole->GetSize(); DestroyWindows(); + } std::string error; @@ -93,7 +99,11 @@ void CLocalGUI::SetSkin(const char* szName) m_LastSettingsRevision = cvars->GetRevision(); if (guiWasLoaded) + { CreateWindows(guiWasLoaded); + m_pConsole->SetPosition(consolePos); + m_pConsole->SetSize(consoleSize); + } if (CCore::GetSingleton().GetConsole() && !error.empty()) CCore::GetSingleton().GetConsole()->Echo(error.c_str()); @@ -104,8 +114,8 @@ void CLocalGUI::ChangeLocale(const char* szName) bool guiWasLoaded = m_pMainMenu != NULL; assert(guiWasLoaded); - CVector2D vPos = m_pConsole->GetPosition(); - CVector2D vSize = m_pConsole->GetSize(); + CVector2D consolePos = m_pConsole->GetPosition(); + CVector2D consoleSize = m_pConsole->GetSize(); if (guiWasLoaded) DestroyWindows(); @@ -119,12 +129,8 @@ void CLocalGUI::ChangeLocale(const char* szName) if (guiWasLoaded) { CreateWindows(guiWasLoaded); - - if (m_pConsole != nullptr) - { - m_pConsole->SetPosition(vPos); - m_pConsole->SetSize(vSize); - } + m_pConsole->SetPosition(consolePos); + m_pConsole->SetSize(consoleSize); } } From 53deb031ed69ee6074c7a0abd13a47a7a4b48f33 Mon Sep 17 00:00:00 2001 From: Pot Bot <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 20:00:22 +0000 Subject: [PATCH 02/16] Update client en_US pot [ci skip] --- Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot index 0947cb8c01..e42652208b 100644 --- a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot +++ b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MTA San Andreas 1.x\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-10 20:57+0000\n" +"POT-Creation-Date: 2024-10-18 20:00+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -298,7 +298,7 @@ msgstr "" #: Client/loader/MainFunctions.cpp:252 Client/loader/MainFunctions.cpp:267 #: Client/loader/MainFunctions.cpp:269 Client/loader/MainFunctions.cpp:846 #: Client/loader/CInstallManager.cpp:552 Client/loader/CInstallManager.cpp:561 -#: Client/core/CGUI.cpp:87 Client/core/CCore.cpp:1275 +#: Client/core/CGUI.cpp:93 Client/core/CCore.cpp:1275 #: Client/core/CCore.cpp:1288 Client/core/CSettings.cpp:2941 #: Client/core/CSettings.cpp:4166 Client/core/CSettings.cpp:4194 #: Client/core/CSettings.cpp:4764 Client/core/CConnectManager.cpp:80 @@ -1818,7 +1818,7 @@ msgid "English" msgstr "" #. Even the default skin doesn't work, so give up -#: Client/core/CGUI.cpp:86 +#: Client/core/CGUI.cpp:92 msgid "" "The skin you selected could not be loaded, and the default skin also could " "not be loaded, please reinstall MTA." From 64747aa255e290cd143ba15addeee7bee425929f Mon Sep 17 00:00:00 2001 From: FileEX Date: Sun, 20 Oct 2024 09:39:30 +0200 Subject: [PATCH 03/16] Fix #3814 Nitro handling flag bug (#3815) --- Client/game_sa/CVehicleSA.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Client/game_sa/CVehicleSA.cpp b/Client/game_sa/CVehicleSA.cpp index b4e7a2c438..9d4a02598e 100644 --- a/Client/game_sa/CVehicleSA.cpp +++ b/Client/game_sa/CVehicleSA.cpp @@ -1345,16 +1345,20 @@ void CVehicleSA::RecalculateHandling() continue; // If NOS is installed we need set the flag - if ((upgradeID >= 1008 && upgradeID <= 1010) && !(uiHandlingFlags & HANDLING_NOS_Flag)) + if ((upgradeID >= 1008 && upgradeID <= 1010)) { - uiHandlingFlags |= HANDLING_NOS_Flag; + if (!(uiHandlingFlags & HANDLING_NOS_Flag)) + uiHandlingFlags |= HANDLING_NOS_Flag; + nitroInstalled = true; } // If hydraulics is installed we need set the flag - if ((upgradeID == 1087) && !(uiHandlingFlags & HANDLING_Hydraulics_Flag)) + if ((upgradeID == 1087)) { - uiHandlingFlags |= HANDLING_Hydraulics_Flag; + if (!(uiHandlingFlags & HANDLING_Hydraulics_Flag)) + uiHandlingFlags |= HANDLING_Hydraulics_Flag; + hydralicsInstalled = true; } } From bfdfdb5f44726df85626e6e3e06c2a319c0c8962 Mon Sep 17 00:00:00 2001 From: lopsi <40902730+Lpsd@users.noreply.github.com> Date: Sun, 20 Oct 2024 09:40:36 +0200 Subject: [PATCH 04/16] Add main menu setting for browser GPU rendering (#3816) * Adds browser_enable_gpu and browser_enable_gpu_compositing CVARS * Adds options to "web browser" tab in main menu settings * Add isBrowserGPUEnabled lua definition (clientside) --- Client/cefweb/CWebApp.cpp | 10 +++++ Client/cefweb/CWebCore.cpp | 16 +++++++- Client/cefweb/CWebCore.h | 9 +++- Client/core/CClientVariables.cpp | 2 + Client/core/CCore.cpp | 8 +++- Client/core/CSettings.cpp | 41 ++++++++++++++++++- Client/core/CSettings.h | 3 ++ .../logic/luadefs/CLuaBrowserDefs.cpp | 7 ++++ .../logic/luadefs/CLuaBrowserDefs.h | 1 + Client/sdk/core/CWebCoreInterface.h | 5 ++- 10 files changed, 97 insertions(+), 5 deletions(-) diff --git a/Client/cefweb/CWebApp.cpp b/Client/cefweb/CWebApp.cpp index a6fe5397e5..6013d326d6 100644 --- a/Client/cefweb/CWebApp.cpp +++ b/Client/cefweb/CWebApp.cpp @@ -21,6 +21,16 @@ CefRefPtr CWebApp::HandleError(const SString& strError, unsi void CWebApp::OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr command_line) { + CWebCore* pWebCore = static_cast(g_pCore->GetWebCore()); + + if (!pWebCore->GetGPUEnabled()) // if GPU is disabled... + { + command_line->AppendSwitch("disable-gpu-compositing"); + command_line->AppendSwitch("disable-gpu"); + } + else if (!pWebCore->GetGPUCompositingEnabled()) // if GPU is enabled, but compositing is disabled... + command_line->AppendSwitch("disable-gpu-compositing"); + // command_line->AppendSwitch("disable-d3d11"); command_line->AppendSwitch("enable-begin-frame-scheduling"); diff --git a/Client/cefweb/CWebCore.cpp b/Client/cefweb/CWebCore.cpp index fe02e029a3..c30700b88b 100644 --- a/Client/cefweb/CWebCore.cpp +++ b/Client/cefweb/CWebCore.cpp @@ -49,10 +49,14 @@ CWebCore::~CWebCore() delete m_pXmlConfig; } -bool CWebCore::Initialise() +bool CWebCore::Initialise(bool gpuEnabled, bool gpuCompositingEnabled) { CefMainArgs mainArgs; void* sandboxInfo = nullptr; + + m_bGPUEnabled = gpuEnabled; + m_bGPUCompositingEnabled = gpuCompositingEnabled; + CefRefPtr app(new CWebApp); #ifdef CEF_ENABLE_SANDBOX @@ -869,3 +873,13 @@ void CWebCore::StaticFetchBlacklistFinished(const SHttpDownloadResult& result) OutputDebugLine("Updated browser blacklist!"); #endif } + +bool CWebCore::GetGPUEnabled() const noexcept +{ + return m_bGPUEnabled; +} + +bool CWebCore::GetGPUCompositingEnabled() const noexcept +{ + return m_bGPUCompositingEnabled; +} diff --git a/Client/cefweb/CWebCore.h b/Client/cefweb/CWebCore.h index 4db4a9036c..70a307372d 100644 --- a/Client/cefweb/CWebCore.h +++ b/Client/cefweb/CWebCore.h @@ -54,7 +54,7 @@ class CWebCore : public CWebCoreInterface public: CWebCore(); ~CWebCore(); - bool Initialise() override; + bool Initialise(bool gpuEnabled, bool gpuCompositingEnabled) override; CWebViewInterface* CreateWebView(unsigned int uiWidth, unsigned int uiHeight, bool bIsLocal, CWebBrowserItem* pWebBrowserRenderItem, bool bTransparent); void DestroyWebView(CWebViewInterface* pWebViewInterface); @@ -108,6 +108,9 @@ class CWebCore : public CWebCoreInterface static void StaticFetchWhitelistFinished(const SHttpDownloadResult& result); static void StaticFetchBlacklistFinished(const SHttpDownloadResult& result); + bool GetGPUEnabled() const noexcept; + bool GetGPUCompositingEnabled() const noexcept; + private: typedef std::pair WebFilterPair; @@ -129,4 +132,8 @@ class CWebCore : public CWebCoreInterface CXMLFile* m_pXmlConfig; int m_iWhitelistRevision; int m_iBlacklistRevision; + + // Shouldn't be changed after init + bool m_bGPUEnabled; + bool m_bGPUCompositingEnabled; }; diff --git a/Client/core/CClientVariables.cpp b/Client/core/CClientVariables.cpp index fb9bd3b245..a64cf8f724 100644 --- a/Client/core/CClientVariables.cpp +++ b/Client/core/CClientVariables.cpp @@ -358,6 +358,8 @@ void CClientVariables::LoadDefaults() DEFAULT("discord_rpc_share_data", false); // Consistent Rich Presence data sharing DEFAULT("discord_rpc_share_data_firsttime", false); // Display the user data sharing consent dialog box - for the first time DEFAULT("_beta_qc_rightclick_command", _S("reconnect")); // Command to run when right clicking quick connect (beta - can be removed at any time) + DEFAULT("browser_enable_gpu", true); // Enable GPU in CEF? (allows stuff like WebGL to function) + DEFAULT("browser_enable_gpu_compositing", true); // Enable GPU compositing in CEF? (required GPU enabled) if (!Exists("locale")) { diff --git a/Client/core/CCore.cpp b/Client/core/CCore.cpp index b9a2391f46..cc15103bef 100644 --- a/Client/core/CCore.cpp +++ b/Client/core/CCore.cpp @@ -1155,8 +1155,14 @@ CWebCoreInterface* CCore::GetWebCore() { if (m_pWebCore == nullptr) { + bool gpuEnabled; + bool gpuCompositingEnabled; + auto cvars = g_pCore->GetCVars(); + cvars->Get("browser_enable_gpu", gpuEnabled); + cvars->Get("browser_enable_gpu_compositing", gpuCompositingEnabled); + m_pWebCore = CreateModule(m_WebCoreModule, "CefWeb", "cefweb", "InitWebCoreInterface", this); - m_pWebCore->Initialise(); + m_pWebCore->Initialise(gpuEnabled, gpuCompositingEnabled); } return m_pWebCore; } diff --git a/Client/core/CSettings.cpp b/Client/core/CSettings.cpp index 847735a891..6bd1dcae0d 100644 --- a/Client/core/CSettings.cpp +++ b/Client/core/CSettings.cpp @@ -917,6 +917,16 @@ void CSettings::CreateGUI() m_pCheckBoxRemoteJavascript->GetPosition(vecTemp); m_pCheckBoxRemoteJavascript->AutoSize(NULL, 20.0f); + m_pCheckBoxBrowserGPUEnabled = reinterpret_cast(pManager->CreateCheckBox(m_pTabBrowser, _("Enable GPU rendering"), true)); + m_pCheckBoxBrowserGPUEnabled->SetPosition(CVector2D(vecTemp.fX + 300.0f, vecTemp.fY - 20.0f)); + m_pCheckBoxBrowserGPUEnabled->AutoSize(NULL, 20.0f); + m_pCheckBoxBrowserGPUEnabled->SetClickHandler(GUI_CALLBACK(&CSettings::OnGPUSettingChanged, this)); + + m_pCheckBoxBrowserGPUCompositingEnabled = + reinterpret_cast(pManager->CreateCheckBox(m_pTabBrowser, _("Enable GPU compositing"), true)); + m_pCheckBoxBrowserGPUCompositingEnabled->SetPosition(CVector2D(vecTemp.fX + 300.0f, vecTemp.fY)); + m_pCheckBoxBrowserGPUCompositingEnabled->AutoSize(NULL, 20.0f); + m_pLabelBrowserCustomBlacklist = reinterpret_cast(pManager->CreateLabel(m_pTabBrowser, _("Custom blacklist"))); m_pLabelBrowserCustomBlacklist->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 30.0f)); m_pLabelBrowserCustomBlacklist->GetPosition(vecTemp); @@ -3287,6 +3297,14 @@ void CSettings::LoadData() m_pCheckBoxRemoteBrowser->SetSelected(bVar); CVARS_GET("browser_remote_javascript", bVar); m_pCheckBoxRemoteJavascript->SetSelected(bVar); + CVARS_GET("browser_enable_gpu", bVar); + m_pCheckBoxBrowserGPUEnabled->SetSelected(bVar); + + if (!bVar) + m_pCheckBoxBrowserGPUCompositingEnabled->SetEnabled(false); + + CVARS_GET("browser_enable_gpu_compositing", bVar); + m_pCheckBoxBrowserGPUCompositingEnabled->SetSelected(bVar); ReloadBrowserLists(); } @@ -3711,6 +3729,20 @@ void CSettings::SaveData() bBrowserSettingChanged = true; } + bool bBrowserGPUEnabled = false; + CVARS_GET("browser_enable_gpu", bBrowserGPUEnabled); + + bool bBrowserGPUSetting = m_pCheckBoxBrowserGPUEnabled->GetSelected(); + bool bBrowserGPUSettingChanged = (bBrowserGPUSetting != bBrowserGPUEnabled); + CVARS_SET("browser_enable_gpu", bBrowserGPUSetting); + + bool bBrowserGPUCompositingEnabled = false; + CVARS_GET("browser_enable_gpu_compositing", bBrowserGPUCompositingEnabled); + + bool bBrowserGPUCompositingSetting = m_pCheckBoxBrowserGPUCompositingEnabled->GetSelected(); + bool bBrowserGPUCompositingSettingChanged = (bBrowserGPUCompositingSetting != bBrowserGPUCompositingEnabled); + CVARS_SET("browser_enable_gpu_compositing", bBrowserGPUCompositingSetting); + // Ensure CVARS ranges ok CClientVariables::GetSingleton().ValidateValues(); @@ -3720,7 +3752,8 @@ void CSettings::SaveData() gameSettings->Save(); // Ask to restart? - if (bIsVideoModeChanged || bIsAntiAliasingChanged || bIsCustomizedSAFilesChanged || processsDPIAwareChanged) + if (bIsVideoModeChanged || bIsAntiAliasingChanged || bIsCustomizedSAFilesChanged || processsDPIAwareChanged || bBrowserGPUSettingChanged || + bBrowserGPUCompositingSettingChanged) ShowRestartQuestion(); else if (CModManager::GetSingleton().IsLoaded() && bBrowserSettingChanged) ShowDisconnectQuestion(); @@ -4873,3 +4906,9 @@ bool CSettings::IsActive() { return m_pWindow->IsActive(); } + +bool CSettings::OnGPUSettingChanged(CGUIElement* pElement) +{ + m_pCheckBoxBrowserGPUCompositingEnabled->SetEnabled(m_pCheckBoxBrowserGPUEnabled->GetSelected()); + return true; +} diff --git a/Client/core/CSettings.h b/Client/core/CSettings.h index bfeec87c44..014590b80c 100644 --- a/Client/core/CSettings.h +++ b/Client/core/CSettings.h @@ -338,6 +338,8 @@ class CSettings CGUIButton* m_pButtonBrowserWhitelistAdd; CGUIGridList* m_pGridBrowserWhitelist; CGUIButton* m_pButtonBrowserWhitelistRemove; + CGUICheckBox* m_pCheckBoxBrowserGPUEnabled; + CGUICheckBox* m_pCheckBoxBrowserGPUCompositingEnabled; bool m_bBrowserListsChanged; bool m_bBrowserListsLoadEnabled; @@ -382,6 +384,7 @@ class CSettings bool OnBrowserWhitelistRemove(CGUIElement* pElement); bool OnBrowserWhitelistDomainAddFocused(CGUIElement* pElement); bool OnBrowserWhitelistDomainAddDefocused(CGUIElement* pElement); + bool OnGPUSettingChanged(CGUIElement* pElement); bool OnMouseDoubleClick(CGUIMouseEventArgs Args); diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaBrowserDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaBrowserDefs.cpp index 6077f45346..a5b9fa95ac 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaBrowserDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaBrowserDefs.cpp @@ -49,6 +49,7 @@ void CLuaBrowserDefs::LoadFunctions() {"resizeBrowser", ResizeBrowser}, {"guiCreateBrowser", GUICreateBrowser}, {"guiGetBrowser", GUIGetBrowser}, + {"isBrowserGPUEnabled", ArgumentParser}, }; // Add browser functions @@ -97,6 +98,7 @@ void CLuaBrowserDefs::AddClass(lua_State* luaVM) lua_classvariable(luaVM, "renderingPaused", "setBrowserRenderingPaused", "isBrowserRenderingPaused"); lua_classvariable(luaVM, "volume", "setBrowserVolume", "getBrowserVolume"); lua_classvariable(luaVM, "devTools", "toggleBrowserDevTools", nullptr); + lua_classvariable(luaVM, "gpuEnabled", nullptr, "isBrowserGPUEnabled"); lua_registerclass(luaVM, "Browser", "DxTexture"); @@ -1054,3 +1056,8 @@ int CLuaBrowserDefs::SetBrowserAjaxHandler(lua_State* luaVM) lua_pushboolean(luaVM, false); return 1; } + +bool CLuaBrowserDefs::IsBrowserGPUEnabled() noexcept +{ + return g_pCore->GetWebCore()->GetGPUEnabled(); +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaBrowserDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaBrowserDefs.h index 33d156b0f5..988efb6c40 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaBrowserDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaBrowserDefs.h @@ -51,4 +51,5 @@ class CLuaBrowserDefs : public CLuaDefs LUA_DECLARE(ResizeBrowser); LUA_DECLARE(GUICreateBrowser); LUA_DECLARE(GUIGetBrowser); + static bool IsBrowserGPUEnabled() noexcept; }; diff --git a/Client/sdk/core/CWebCoreInterface.h b/Client/sdk/core/CWebCoreInterface.h index e1e2f7651d..6bac4b777e 100644 --- a/Client/sdk/core/CWebCoreInterface.h +++ b/Client/sdk/core/CWebCoreInterface.h @@ -49,7 +49,7 @@ class CWebCoreInterface { public: virtual ~CWebCoreInterface() {} - virtual bool Initialise() = 0; + virtual bool Initialise(bool gpuEnabled, bool gpuCompositingEnabled) = 0; virtual CWebViewInterface* CreateWebView(unsigned int uiWidth, unsigned int uiHeight, bool bIsLocal, CWebBrowserItem* pWebBrowserRenderItem, bool bTransparent) = 0; @@ -90,4 +90,7 @@ class CWebCoreInterface virtual void WriteCustomList(const SString& strListName, const std::vector& customList, bool bReset = true) = 0; virtual void GetFilterEntriesByType(std::vector>& outEntries, eWebFilterType filterType, eWebFilterState state = eWebFilterState::WEBFILTER_ALL) = 0; + + virtual bool GetGPUEnabled() const noexcept = 0; + virtual bool GetGPUCompositingEnabled() const noexcept = 0; }; From c6e9d0b8a8a6d91ac38a77d5e9beef2999d46960 Mon Sep 17 00:00:00 2001 From: Pot Bot <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 20 Oct 2024 07:42:29 +0000 Subject: [PATCH 05/16] Update client en_US pot [ci skip] --- .../MTA/locale/en_US/client.pot | 418 +++++++++--------- 1 file changed, 213 insertions(+), 205 deletions(-) diff --git a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot index e42652208b..8c1697efff 100644 --- a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot +++ b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MTA San Andreas 1.x\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-18 20:00+0000\n" +"POT-Creation-Date: 2024-10-20 07:42+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -35,7 +35,7 @@ msgstr "" msgid "Remember decision" msgstr "" -#: Client/cefweb/CWebsiteRequests.cpp:51 Client/core/CSettings.cpp:974 +#: Client/cefweb/CWebsiteRequests.cpp:51 Client/core/CSettings.cpp:984 msgid "Allow" msgstr "" @@ -160,7 +160,7 @@ msgstr "" #: Client/mods/deathmatch/logic/CResource.cpp:375 #: Client/mods/deathmatch/logic/CClientGame.cpp:1089 Client/core/CCore.cpp:674 -#: Client/core/CSettings.cpp:3483 +#: Client/core/CSettings.cpp:3501 msgid "In-game" msgstr "" @@ -275,7 +275,7 @@ msgstr "" #: Client/mods/deathmatch/logic/CClientGame.cpp:533 #: Client/core/CMainMenu.cpp:304 Client/core/CCore.cpp:674 -#: Client/core/CSettings.cpp:3479 +#: Client/core/CSettings.cpp:3497 msgid "Main menu" msgstr "" @@ -298,10 +298,10 @@ msgstr "" #: Client/loader/MainFunctions.cpp:252 Client/loader/MainFunctions.cpp:267 #: Client/loader/MainFunctions.cpp:269 Client/loader/MainFunctions.cpp:846 #: Client/loader/CInstallManager.cpp:552 Client/loader/CInstallManager.cpp:561 -#: Client/core/CGUI.cpp:93 Client/core/CCore.cpp:1275 -#: Client/core/CCore.cpp:1288 Client/core/CSettings.cpp:2941 -#: Client/core/CSettings.cpp:4166 Client/core/CSettings.cpp:4194 -#: Client/core/CSettings.cpp:4764 Client/core/CConnectManager.cpp:80 +#: Client/core/CGUI.cpp:93 Client/core/CCore.cpp:1281 +#: Client/core/CCore.cpp:1294 Client/core/CSettings.cpp:2951 +#: Client/core/CSettings.cpp:4199 Client/core/CSettings.cpp:4227 +#: Client/core/CSettings.cpp:4797 Client/core/CConnectManager.cpp:80 #: Client/core/CConnectManager.cpp:111 Client/core/CConnectManager.cpp:127 #: Client/core/CConnectManager.cpp:263 Client/core/CConnectManager.cpp:321 #: Client/core/CConnectManager.cpp:404 Client/core/CConnectManager.cpp:411 @@ -678,7 +678,7 @@ msgstr "" #. * #: Client/mods/deathmatch/logic/CLocalServer.cpp:51 #: Client/core/CSettings.cpp:442 Client/core/CSettings.cpp:630 -#: Client/core/CSettings.cpp:904 Client/core/CSettings.cpp:2018 +#: Client/core/CSettings.cpp:904 Client/core/CSettings.cpp:2028 msgid "General" msgstr "" @@ -734,7 +734,7 @@ msgstr "" #: Client/gui/CGUIMessageBox_Impl.cpp:68 Client/loader/Dialogs.cpp:136 #: Client/core/CVersionUpdater.cpp:1790 Client/core/CVersionUpdater.cpp:1806 #: Client/core/CVersionUpdater.cpp:1841 Client/core/CSettings.cpp:132 -#: Client/core/CSettings.cpp:4784 +#: Client/core/CSettings.cpp:4817 msgid "Cancel" msgstr "" @@ -770,7 +770,7 @@ msgstr "" #: Client/core/CVersionUpdater.cpp:1956 Client/core/CVersionUpdater.cpp:1968 #: Client/core/CVersionUpdater.cpp:2120 Client/core/CVersionUpdater.cpp:2129 #: Client/core/CVersionUpdater.cpp:2138 Client/core/CVersionUpdater.cpp:2152 -#: Client/core/CSettings.cpp:127 Client/core/CSettings.cpp:4785 +#: Client/core/CSettings.cpp:127 Client/core/CSettings.cpp:4818 msgid "OK" msgstr "" @@ -784,9 +784,9 @@ msgstr "" #: Client/core/CVersionUpdater.cpp:1572 Client/core/CVersionUpdater.cpp:1590 #: Client/core/CVersionUpdater.cpp:1859 Client/core/CVersionUpdater.cpp:1878 #: Client/core/CQuestionBox.cpp:195 Client/core/CMainMenu.cpp:1200 -#: Client/core/CSettings.cpp:1389 Client/core/CSettings.cpp:1413 -#: Client/core/CSettings.cpp:4489 Client/core/CSettings.cpp:4563 -#: Client/core/CSettings.cpp:4593 Client/core/CSettings.cpp:4642 +#: Client/core/CSettings.cpp:1399 Client/core/CSettings.cpp:1423 +#: Client/core/CSettings.cpp:4522 Client/core/CSettings.cpp:4596 +#: Client/core/CSettings.cpp:4626 Client/core/CSettings.cpp:4675 #: Client/core/ServerBrowser/CServerInfo.cpp:481 msgid "Yes" msgstr "" @@ -913,10 +913,10 @@ msgstr "" #: Client/loader/Dialogs.cpp:132 Client/core/CVersionUpdater.cpp:1571 #: Client/core/CVersionUpdater.cpp:1589 Client/core/CVersionUpdater.cpp:1858 #: Client/core/CVersionUpdater.cpp:1877 Client/core/CQuestionBox.cpp:194 -#: Client/core/CMainMenu.cpp:1199 Client/core/CSettings.cpp:1388 -#: Client/core/CSettings.cpp:1412 Client/core/CSettings.cpp:4488 -#: Client/core/CSettings.cpp:4562 Client/core/CSettings.cpp:4592 -#: Client/core/CSettings.cpp:4641 Client/core/ServerBrowser/CServerInfo.cpp:481 +#: Client/core/CMainMenu.cpp:1199 Client/core/CSettings.cpp:1398 +#: Client/core/CSettings.cpp:1422 Client/core/CSettings.cpp:4521 +#: Client/core/CSettings.cpp:4595 Client/core/CSettings.cpp:4625 +#: Client/core/CSettings.cpp:4674 Client/core/ServerBrowser/CServerInfo.cpp:481 msgid "No" msgstr "" @@ -1123,12 +1123,12 @@ msgid "" msgstr "" #: Client/loader/MainFunctions.cpp:389 Client/core/CSettings.cpp:662 -#: Client/core/CSettings.cpp:1004 +#: Client/core/CSettings.cpp:1014 msgid "Fullscreen mode:" msgstr "" #: Client/loader/MainFunctions.cpp:389 Client/core/CSettings.cpp:670 -#: Client/core/CSettings.cpp:1615 +#: Client/core/CSettings.cpp:1625 msgid "Borderless window" msgstr "" @@ -1516,7 +1516,7 @@ msgstr "" msgid " - Unknown problem in _DialogUpdateResult" msgstr "" -#: Client/core/CVersionUpdater.cpp:2081 Client/core/CSettings.cpp:4590 +#: Client/core/CVersionUpdater.cpp:2081 Client/core/CSettings.cpp:4623 msgid "CUSTOMIZED GTA:SA FILES" msgstr "" @@ -1569,13 +1569,13 @@ msgstr "" msgid "Backwards" msgstr "" -#: Client/core/CKeyBinds.cpp:191 Client/core/CSettings.cpp:2240 -#: Client/core/CSettings.cpp:2268 +#: Client/core/CKeyBinds.cpp:191 Client/core/CSettings.cpp:2250 +#: Client/core/CSettings.cpp:2278 msgid "Left" msgstr "" -#: Client/core/CKeyBinds.cpp:192 Client/core/CSettings.cpp:2242 -#: Client/core/CSettings.cpp:2269 +#: Client/core/CKeyBinds.cpp:192 Client/core/CSettings.cpp:2252 +#: Client/core/CSettings.cpp:2279 msgid "Right" msgstr "" @@ -1895,102 +1895,102 @@ msgstr "" msgid "%s module is incorrect!" msgstr "" -#: Client/core/CCore.cpp:1275 +#: Client/core/CCore.cpp:1281 msgid "Error executing URL" msgstr "" -#: Client/core/CCore.cpp:1287 +#: Client/core/CCore.cpp:1293 #, c-format msgid "Error running mod specified in command line ('%s')" msgstr "" #. m_pCommands->Add ( "e", CCommandFuncs::Editor ); #. m_pCommands->Add ( "clear", CCommandFuncs::Clear ); -#: Client/core/CCore.cpp:1389 +#: Client/core/CCore.cpp:1395 msgid "this help screen" msgstr "" -#: Client/core/CCore.cpp:1390 Client/core/CCore.cpp:1391 +#: Client/core/CCore.cpp:1396 Client/core/CCore.cpp:1397 msgid "exits the application" msgstr "" -#: Client/core/CCore.cpp:1392 +#: Client/core/CCore.cpp:1398 msgid "shows the version" msgstr "" -#: Client/core/CCore.cpp:1393 +#: Client/core/CCore.cpp:1399 msgid "shows the time" msgstr "" -#: Client/core/CCore.cpp:1394 +#: Client/core/CCore.cpp:1400 msgid "shows the hud" msgstr "" -#: Client/core/CCore.cpp:1395 +#: Client/core/CCore.cpp:1401 msgid "shows all the binds" msgstr "" -#: Client/core/CCore.cpp:1396 +#: Client/core/CCore.cpp:1402 msgid "shows your serial" msgstr "" -#: Client/core/CCore.cpp:1405 +#: Client/core/CCore.cpp:1411 msgid "connects to a server (host port nick pass)" msgstr "" -#: Client/core/CCore.cpp:1406 +#: Client/core/CCore.cpp:1412 msgid "connects to a previous server" msgstr "" -#: Client/core/CCore.cpp:1407 +#: Client/core/CCore.cpp:1413 msgid "binds a key (key control)" msgstr "" -#: Client/core/CCore.cpp:1408 +#: Client/core/CCore.cpp:1414 msgid "unbinds a key (key)" msgstr "" -#: Client/core/CCore.cpp:1409 +#: Client/core/CCore.cpp:1415 msgid "copies the default gta controls" msgstr "" -#: Client/core/CCore.cpp:1410 +#: Client/core/CCore.cpp:1416 msgid "outputs a screenshot" msgstr "" -#: Client/core/CCore.cpp:1411 +#: Client/core/CCore.cpp:1417 msgid "immediately saves the config" msgstr "" -#: Client/core/CCore.cpp:1413 +#: Client/core/CCore.cpp:1419 msgid "clears the debug view" msgstr "" -#: Client/core/CCore.cpp:1414 +#: Client/core/CCore.cpp:1420 msgid "scrolls the chatbox upwards" msgstr "" -#: Client/core/CCore.cpp:1415 +#: Client/core/CCore.cpp:1421 msgid "scrolls the chatbox downwards" msgstr "" -#: Client/core/CCore.cpp:1416 +#: Client/core/CCore.cpp:1422 msgid "scrolls the debug view upwards" msgstr "" -#: Client/core/CCore.cpp:1417 +#: Client/core/CCore.cpp:1423 msgid "scrolls the debug view downwards" msgstr "" -#: Client/core/CCore.cpp:1420 +#: Client/core/CCore.cpp:1426 msgid "shows the memory statistics" msgstr "" -#: Client/core/CCore.cpp:1421 +#: Client/core/CCore.cpp:1427 msgid "shows the frame timing graph" msgstr "" -#: Client/core/CCore.cpp:1425 +#: Client/core/CCore.cpp:1431 msgid "for developers: reload news" msgstr "" @@ -2196,15 +2196,15 @@ msgstr "" msgid "Usertrack options" msgstr "" -#: Client/core/CSettings.cpp:573 Client/core/CSettings.cpp:3087 +#: Client/core/CSettings.cpp:573 Client/core/CSettings.cpp:3097 msgid "Radio" msgstr "" -#: Client/core/CSettings.cpp:574 Client/core/CSettings.cpp:3089 +#: Client/core/CSettings.cpp:574 Client/core/CSettings.cpp:3099 msgid "Random" msgstr "" -#: Client/core/CSettings.cpp:575 Client/core/CSettings.cpp:3091 +#: Client/core/CSettings.cpp:575 Client/core/CSettings.cpp:3101 msgid "Sequential" msgstr "" @@ -2279,11 +2279,11 @@ msgstr "" msgid "DPI aware" msgstr "" -#: Client/core/CSettings.cpp:669 Client/core/CSettings.cpp:1613 +#: Client/core/CSettings.cpp:669 Client/core/CSettings.cpp:1623 msgid "Standard" msgstr "" -#: Client/core/CSettings.cpp:671 Client/core/CSettings.cpp:1617 +#: Client/core/CSettings.cpp:671 Client/core/CSettings.cpp:1627 msgid "Borderless keep res" msgstr "" @@ -2291,57 +2291,57 @@ msgstr "" msgid "Mip Mapping" msgstr "" -#: Client/core/CSettings.cpp:743 Client/core/CSettings.cpp:1517 +#: Client/core/CSettings.cpp:743 Client/core/CSettings.cpp:1527 msgid "Low" msgstr "" -#: Client/core/CSettings.cpp:744 Client/core/CSettings.cpp:1519 +#: Client/core/CSettings.cpp:744 Client/core/CSettings.cpp:1529 msgid "Medium" msgstr "" -#: Client/core/CSettings.cpp:745 Client/core/CSettings.cpp:1086 -#: Client/core/CSettings.cpp:1521 Client/core/CSettings.cpp:3145 +#: Client/core/CSettings.cpp:745 Client/core/CSettings.cpp:1096 +#: Client/core/CSettings.cpp:1531 Client/core/CSettings.cpp:3155 msgid "High" msgstr "" -#: Client/core/CSettings.cpp:746 Client/core/CSettings.cpp:1523 +#: Client/core/CSettings.cpp:746 Client/core/CSettings.cpp:1533 msgid "Very high" msgstr "" #: Client/core/CSettings.cpp:761 Client/core/CSettings.cpp:784 -#: Client/core/CSettings.cpp:1017 Client/core/CSettings.cpp:1071 -#: Client/core/CSettings.cpp:1201 Client/core/CSettings.cpp:1527 -#: Client/core/CSettings.cpp:3152 Client/core/CSettings.cpp:3184 -#: Client/core/CSettings.cpp:3206 Client/core/CSettings.cpp:4234 +#: Client/core/CSettings.cpp:1027 Client/core/CSettings.cpp:1081 +#: Client/core/CSettings.cpp:1211 Client/core/CSettings.cpp:1537 +#: Client/core/CSettings.cpp:3162 Client/core/CSettings.cpp:3194 +#: Client/core/CSettings.cpp:3216 Client/core/CSettings.cpp:4267 msgid "Off" msgstr "" -#: Client/core/CSettings.cpp:785 Client/core/CSettings.cpp:1529 +#: Client/core/CSettings.cpp:785 Client/core/CSettings.cpp:1539 msgid "1x" msgstr "" -#: Client/core/CSettings.cpp:786 Client/core/CSettings.cpp:1531 +#: Client/core/CSettings.cpp:786 Client/core/CSettings.cpp:1541 msgid "2x" msgstr "" -#: Client/core/CSettings.cpp:787 Client/core/CSettings.cpp:1533 +#: Client/core/CSettings.cpp:787 Client/core/CSettings.cpp:1543 msgid "3x" msgstr "" -#: Client/core/CSettings.cpp:800 Client/core/CSettings.cpp:1019 -#: Client/core/CSettings.cpp:1539 Client/core/CSettings.cpp:3154 +#: Client/core/CSettings.cpp:800 Client/core/CSettings.cpp:1029 +#: Client/core/CSettings.cpp:1549 Client/core/CSettings.cpp:3164 msgid "Auto" msgstr "" -#: Client/core/CSettings.cpp:801 Client/core/CSettings.cpp:1541 +#: Client/core/CSettings.cpp:801 Client/core/CSettings.cpp:1551 msgid "4:3" msgstr "" -#: Client/core/CSettings.cpp:802 Client/core/CSettings.cpp:1543 +#: Client/core/CSettings.cpp:802 Client/core/CSettings.cpp:1553 msgid "16:10" msgstr "" -#: Client/core/CSettings.cpp:803 Client/core/CSettings.cpp:1545 +#: Client/core/CSettings.cpp:803 Client/core/CSettings.cpp:1555 msgid "16:9" msgstr "" @@ -2406,349 +2406,357 @@ msgid "Enable Javascript on remote websites" msgstr "" #: Client/core/CSettings.cpp:920 +msgid "Enable GPU rendering" +msgstr "" + +#: Client/core/CSettings.cpp:926 +msgid "Enable GPU compositing" +msgstr "" + +#: Client/core/CSettings.cpp:930 msgid "Custom blacklist" msgstr "" -#: Client/core/CSettings.cpp:931 Client/core/CSettings.cpp:966 +#: Client/core/CSettings.cpp:941 Client/core/CSettings.cpp:976 msgid "Enter a domain e.g. google.com" msgstr "" -#: Client/core/CSettings.cpp:939 +#: Client/core/CSettings.cpp:949 msgid "Block" msgstr "" -#: Client/core/CSettings.cpp:947 Client/core/CSettings.cpp:982 +#: Client/core/CSettings.cpp:957 Client/core/CSettings.cpp:992 msgid "Domain" msgstr "" -#: Client/core/CSettings.cpp:949 Client/core/CSettings.cpp:984 +#: Client/core/CSettings.cpp:959 Client/core/CSettings.cpp:994 msgid "Remove domain" msgstr "" #. Reset vecTemp -#: Client/core/CSettings.cpp:955 +#: Client/core/CSettings.cpp:965 msgid "Custom whitelist" msgstr "" #. Misc section label -#: Client/core/CSettings.cpp:997 +#: Client/core/CSettings.cpp:1007 msgid "Misc" msgstr "" #. Fast clothes loading -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1010 -#: Client/core/CSettings.cpp:4803 +#: Client/core/CSettings.cpp:1013 Client/core/CSettings.cpp:1020 +#: Client/core/CSettings.cpp:4836 msgid "Fast CJ clothes loading:" msgstr "" #. Browser scan speed -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1024 -#: Client/core/CSettings.cpp:4805 +#: Client/core/CSettings.cpp:1013 Client/core/CSettings.cpp:1034 +#: Client/core/CSettings.cpp:4838 msgid "Browser speed:" msgstr "" #. Single download -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1038 -#: Client/core/CSettings.cpp:4807 +#: Client/core/CSettings.cpp:1013 Client/core/CSettings.cpp:1048 +#: Client/core/CSettings.cpp:4840 msgid "Single connection:" msgstr "" #. Packet tag -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1051 -#: Client/core/CSettings.cpp:4809 +#: Client/core/CSettings.cpp:1013 Client/core/CSettings.cpp:1061 +#: Client/core/CSettings.cpp:4842 msgid "Packet tag:" msgstr "" #. Progress animation -#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1064 -#: Client/core/CSettings.cpp:4811 +#: Client/core/CSettings.cpp:1014 Client/core/CSettings.cpp:1074 +#: Client/core/CSettings.cpp:4844 msgid "Progress animation:" msgstr "" #. Process priority -#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1077 -#: Client/core/CSettings.cpp:4801 +#: Client/core/CSettings.cpp:1014 Client/core/CSettings.cpp:1087 +#: Client/core/CSettings.cpp:4834 msgid "Process priority:" msgstr "" #. Debug setting -#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1091 -#: Client/core/CSettings.cpp:4813 +#: Client/core/CSettings.cpp:1014 Client/core/CSettings.cpp:1101 +#: Client/core/CSettings.cpp:4846 msgid "Debug setting:" msgstr "" #. Streaming memory -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1114 -#: Client/core/CSettings.cpp:4815 +#: Client/core/CSettings.cpp:1015 Client/core/CSettings.cpp:1124 +#: Client/core/CSettings.cpp:4848 msgid "Streaming memory:" msgstr "" #. Update build type -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1215 +#: Client/core/CSettings.cpp:1015 Client/core/CSettings.cpp:1225 msgid "Update build type:" msgstr "" #. UpdateAutoInstall -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1194 +#: Client/core/CSettings.cpp:1015 Client/core/CSettings.cpp:1204 msgid "Install important updates:" msgstr "" -#: Client/core/CSettings.cpp:1018 Client/core/CSettings.cpp:1046 -#: Client/core/CSettings.cpp:1059 Client/core/CSettings.cpp:3156 -#: Client/core/CSettings.cpp:3172 Client/core/CSettings.cpp:3179 +#: Client/core/CSettings.cpp:1028 Client/core/CSettings.cpp:1056 +#: Client/core/CSettings.cpp:1069 Client/core/CSettings.cpp:3166 +#: Client/core/CSettings.cpp:3182 Client/core/CSettings.cpp:3189 msgid "On" msgstr "" -#: Client/core/CSettings.cpp:1031 Client/core/CSettings.cpp:3161 +#: Client/core/CSettings.cpp:1041 Client/core/CSettings.cpp:3171 msgid "Very slow" msgstr "" -#: Client/core/CSettings.cpp:1032 Client/core/CSettings.cpp:1045 -#: Client/core/CSettings.cpp:1058 Client/core/CSettings.cpp:1072 -#: Client/core/CSettings.cpp:1098 Client/core/CSettings.cpp:1110 -#: Client/core/CSettings.cpp:1202 Client/core/CSettings.cpp:1222 -#: Client/core/CSettings.cpp:3163 Client/core/CSettings.cpp:3170 -#: Client/core/CSettings.cpp:3177 Client/core/CSettings.cpp:3186 -#: Client/core/CSettings.cpp:3199 +#: Client/core/CSettings.cpp:1042 Client/core/CSettings.cpp:1055 +#: Client/core/CSettings.cpp:1068 Client/core/CSettings.cpp:1082 +#: Client/core/CSettings.cpp:1108 Client/core/CSettings.cpp:1120 +#: Client/core/CSettings.cpp:1212 Client/core/CSettings.cpp:1232 +#: Client/core/CSettings.cpp:3173 Client/core/CSettings.cpp:3180 +#: Client/core/CSettings.cpp:3187 Client/core/CSettings.cpp:3196 +#: Client/core/CSettings.cpp:3209 msgid "Default" msgstr "" -#: Client/core/CSettings.cpp:1033 Client/core/CSettings.cpp:3165 +#: Client/core/CSettings.cpp:1043 Client/core/CSettings.cpp:3175 msgid "Fast" msgstr "" -#: Client/core/CSettings.cpp:1084 Client/core/CSettings.cpp:3141 +#: Client/core/CSettings.cpp:1094 Client/core/CSettings.cpp:3151 msgid "Normal" msgstr "" -#: Client/core/CSettings.cpp:1085 Client/core/CSettings.cpp:3143 +#: Client/core/CSettings.cpp:1095 Client/core/CSettings.cpp:3153 msgid "Above normal" msgstr "" -#: Client/core/CSettings.cpp:1121 +#: Client/core/CSettings.cpp:1131 msgid "Min" msgstr "" -#: Client/core/CSettings.cpp:1134 +#: Client/core/CSettings.cpp:1144 msgid "Max" msgstr "" #. Windows 8 compatibility -#: Client/core/CSettings.cpp:1141 +#: Client/core/CSettings.cpp:1151 msgid "Windows 8 compatibility:" msgstr "" -#: Client/core/CSettings.cpp:1145 +#: Client/core/CSettings.cpp:1155 msgid "16-bit color" msgstr "" -#: Client/core/CSettings.cpp:1150 +#: Client/core/CSettings.cpp:1160 msgid "Mouse fix" msgstr "" #. Cache path info -#: Client/core/CSettings.cpp:1168 +#: Client/core/CSettings.cpp:1178 msgid "Client resource files:" msgstr "" -#: Client/core/CSettings.cpp:1172 +#: Client/core/CSettings.cpp:1182 msgid "Show in Explorer" msgstr "" #. Auto updater section label -#: Client/core/CSettings.cpp:1187 Client/core/CSettings.cpp:1190 +#: Client/core/CSettings.cpp:1197 Client/core/CSettings.cpp:1200 msgid "Auto updater" msgstr "" #. Check for updates -#: Client/core/CSettings.cpp:1228 +#: Client/core/CSettings.cpp:1238 msgid "Check for update now" msgstr "" -#: Client/core/CSettings.cpp:1382 +#: Client/core/CSettings.cpp:1392 msgid "Some settings will be changed when you next start MTA" msgstr "" -#: Client/core/CSettings.cpp:1383 +#: Client/core/CSettings.cpp:1393 msgid "" "\n" "\n" "Do you want to restart now?" msgstr "" -#: Client/core/CSettings.cpp:1386 +#: Client/core/CSettings.cpp:1396 msgid "RESTART REQUIRED" msgstr "" -#: Client/core/CSettings.cpp:1406 +#: Client/core/CSettings.cpp:1416 msgid "Some settings will be changed when you disconnect the current server" msgstr "" -#: Client/core/CSettings.cpp:1407 +#: Client/core/CSettings.cpp:1417 msgid "" "\n" "\n" "Do you want to disconnect now?" msgstr "" -#: Client/core/CSettings.cpp:1410 +#: Client/core/CSettings.cpp:1420 msgid "DISCONNECT REQUIRED" msgstr "" #. Update the joystick name -#: Client/core/CSettings.cpp:1737 +#: Client/core/CSettings.cpp:1747 msgid "Joypad not detected - Check connections and restart game" msgstr "" -#: Client/core/CSettings.cpp:1932 +#: Client/core/CSettings.cpp:1942 msgid "Binding axis" msgstr "" -#: Client/core/CSettings.cpp:1932 +#: Client/core/CSettings.cpp:1942 msgid "Move an axis to bind, or escape to clear" msgstr "" -#: Client/core/CSettings.cpp:2009 +#: Client/core/CSettings.cpp:2019 msgid "Language:" msgstr "" -#: Client/core/CSettings.cpp:2009 +#: Client/core/CSettings.cpp:2019 msgid "Skin:" msgstr "" -#: Client/core/CSettings.cpp:2009 +#: Client/core/CSettings.cpp:2019 msgid "Presets:" msgstr "" -#: Client/core/CSettings.cpp:2058 +#: Client/core/CSettings.cpp:2068 msgid "Chat" msgstr "" -#: Client/core/CSettings.cpp:2075 +#: Client/core/CSettings.cpp:2085 msgid "Load" msgstr "" -#: Client/core/CSettings.cpp:2087 +#: Client/core/CSettings.cpp:2097 msgid "Colors" msgstr "" -#: Client/core/CSettings.cpp:2088 +#: Client/core/CSettings.cpp:2098 msgid "Layout" msgstr "" -#: Client/core/CSettings.cpp:2089 Client/core/CSettings.cpp:2335 +#: Client/core/CSettings.cpp:2099 Client/core/CSettings.cpp:2345 msgid "Options" msgstr "" -#: Client/core/CSettings.cpp:2095 +#: Client/core/CSettings.cpp:2105 msgid "Chat Background" msgstr "" -#: Client/core/CSettings.cpp:2095 +#: Client/core/CSettings.cpp:2105 msgid "Chat Text" msgstr "" -#: Client/core/CSettings.cpp:2095 +#: Client/core/CSettings.cpp:2105 msgid "Input Background" msgstr "" -#: Client/core/CSettings.cpp:2095 +#: Client/core/CSettings.cpp:2105 msgid "Input Text" msgstr "" -#: Client/core/CSettings.cpp:2118 +#: Client/core/CSettings.cpp:2128 msgid "Lines:" msgstr "" -#: Client/core/CSettings.cpp:2118 +#: Client/core/CSettings.cpp:2128 msgid "Scale:" msgstr "" -#: Client/core/CSettings.cpp:2118 +#: Client/core/CSettings.cpp:2128 msgid "Width:" msgstr "" -#: Client/core/CSettings.cpp:2121 +#: Client/core/CSettings.cpp:2131 msgid "Size" msgstr "" -#: Client/core/CSettings.cpp:2170 +#: Client/core/CSettings.cpp:2180 msgid "after" msgstr "" -#: Client/core/CSettings.cpp:2170 +#: Client/core/CSettings.cpp:2180 msgid "for" msgstr "" -#: Client/core/CSettings.cpp:2170 +#: Client/core/CSettings.cpp:2180 msgid "sec" msgstr "" -#: Client/core/CSettings.cpp:2173 +#: Client/core/CSettings.cpp:2183 msgid "Fading" msgstr "" -#: Client/core/CSettings.cpp:2179 +#: Client/core/CSettings.cpp:2189 msgid "Fade out old lines" msgstr "" -#: Client/core/CSettings.cpp:2219 +#: Client/core/CSettings.cpp:2229 msgid "Horizontal:" msgstr "" -#: Client/core/CSettings.cpp:2219 +#: Client/core/CSettings.cpp:2229 msgid "Vertical:" msgstr "" -#: Client/core/CSettings.cpp:2219 +#: Client/core/CSettings.cpp:2229 msgid "Text-Align:" msgstr "" -#: Client/core/CSettings.cpp:2219 +#: Client/core/CSettings.cpp:2229 msgid "X-Offset:" msgstr "" -#: Client/core/CSettings.cpp:2220 +#: Client/core/CSettings.cpp:2230 msgid "Y-Offset:" msgstr "" -#: Client/core/CSettings.cpp:2226 +#: Client/core/CSettings.cpp:2236 msgid "Position" msgstr "" -#: Client/core/CSettings.cpp:2241 Client/core/CSettings.cpp:2255 +#: Client/core/CSettings.cpp:2251 Client/core/CSettings.cpp:2265 msgid "Center" msgstr "" -#: Client/core/CSettings.cpp:2254 +#: Client/core/CSettings.cpp:2264 msgid "Top" msgstr "" -#: Client/core/CSettings.cpp:2256 +#: Client/core/CSettings.cpp:2266 msgid "Bottom" msgstr "" -#: Client/core/CSettings.cpp:2304 +#: Client/core/CSettings.cpp:2314 msgid "Font" msgstr "" -#: Client/core/CSettings.cpp:2341 +#: Client/core/CSettings.cpp:2351 msgid "Hide background when not typing" msgstr "" -#: Client/core/CSettings.cpp:2346 +#: Client/core/CSettings.cpp:2356 msgid "Nickname completion using the \"Tab\" key" msgstr "" -#: Client/core/CSettings.cpp:2351 +#: Client/core/CSettings.cpp:2361 msgid "Allow server to flash the window" msgstr "" -#: Client/core/CSettings.cpp:2356 +#: Client/core/CSettings.cpp:2366 msgid "Allow tray balloon notifications" msgstr "" -#: Client/core/CSettings.cpp:2361 +#: Client/core/CSettings.cpp:2371 msgid "Chat text black/white outline" msgstr "" @@ -2756,85 +2764,85 @@ msgstr "" #. SString strText = SString::Printf ( "Press a key to bind to '%s'", pItemBind->GetText ().c_str () ); #. Create a messagebox to notify the user #. sSString strText = SString::Printf ( "Press a key to bind to '%s'", pItemBind->GetText ().c_str () ); -#: Client/core/CSettings.cpp:2610 Client/core/CSettings.cpp:2617 +#: Client/core/CSettings.cpp:2620 Client/core/CSettings.cpp:2627 msgid "Press a key to bind, or escape to clear" msgstr "" -#: Client/core/CSettings.cpp:2611 +#: Client/core/CSettings.cpp:2621 msgid "Binding a primary key" msgstr "" -#: Client/core/CSettings.cpp:2618 +#: Client/core/CSettings.cpp:2628 msgid "Binding a secondary key" msgstr "" -#: Client/core/CSettings.cpp:2694 +#: Client/core/CSettings.cpp:2704 msgid "GTA GAME CONTROLS" msgstr "" -#: Client/core/CSettings.cpp:2696 +#: Client/core/CSettings.cpp:2706 msgid "MULTIPLAYER CONTROLS" msgstr "" -#: Client/core/CSettings.cpp:2941 Client/core/CSettings.cpp:4764 +#: Client/core/CSettings.cpp:2951 Client/core/CSettings.cpp:4797 msgid "Your nickname contains invalid characters!" msgstr "" -#: Client/core/CSettings.cpp:3778 +#: Client/core/CSettings.cpp:3811 msgid "Red:" msgstr "" -#: Client/core/CSettings.cpp:3778 +#: Client/core/CSettings.cpp:3811 msgid "Green:" msgstr "" -#: Client/core/CSettings.cpp:3778 +#: Client/core/CSettings.cpp:3811 msgid "Blue:" msgstr "" -#: Client/core/CSettings.cpp:3778 +#: Client/core/CSettings.cpp:3811 msgid "Transparency:" msgstr "" -#: Client/core/CSettings.cpp:3781 +#: Client/core/CSettings.cpp:3814 msgid "Color" msgstr "" -#: Client/core/CSettings.cpp:3858 +#: Client/core/CSettings.cpp:3891 msgid "Preview" msgstr "" -#: Client/core/CSettings.cpp:4166 +#: Client/core/CSettings.cpp:4199 msgid "Please disconnect before changing language" msgstr "" -#: Client/core/CSettings.cpp:4194 +#: Client/core/CSettings.cpp:4227 msgid "Please disconnect before changing skin" msgstr "" -#: Client/core/CSettings.cpp:4482 +#: Client/core/CSettings.cpp:4515 msgid "" "Volmetric shadows can cause some systems to slow down.\n" "\n" "Are you sure you want to enable them?" msgstr "" -#: Client/core/CSettings.cpp:4486 +#: Client/core/CSettings.cpp:4519 msgid "PERFORMANCE WARNING" msgstr "" -#: Client/core/CSettings.cpp:4506 +#: Client/core/CSettings.cpp:4539 msgid "" "Screen upload is required by some servers for anti-cheat purposes.\n" "\n" "(The chat box and GUI is excluded from the upload)\n" msgstr "" -#: Client/core/CSettings.cpp:4508 +#: Client/core/CSettings.cpp:4541 msgid "SCREEN UPLOAD INFORMATION" msgstr "" -#: Client/core/CSettings.cpp:4523 +#: Client/core/CSettings.cpp:4556 msgid "" "Some scripts may play sounds, such as radio, from the internet.\n" "\n" @@ -2842,11 +2850,11 @@ msgid "" "bandwidth consumption.\n" msgstr "" -#: Client/core/CSettings.cpp:4526 +#: Client/core/CSettings.cpp:4559 msgid "EXTERNAL SOUNDS" msgstr "" -#: Client/core/CSettings.cpp:4555 +#: Client/core/CSettings.cpp:4588 msgid "" "It seems that you have the Rich Presence connection option enabled.\n" "Do you want to allow servers to share their data?\n" @@ -2854,11 +2862,11 @@ msgid "" "This includes yours unique ID identifier." msgstr "" -#: Client/core/CSettings.cpp:4560 +#: Client/core/CSettings.cpp:4593 msgid "CONSENT TO ALLOW DATA SHARING" msgstr "" -#: Client/core/CSettings.cpp:4584 +#: Client/core/CSettings.cpp:4617 msgid "" "Some files in your GTA:SA data directory are customized.\n" "MTA will only use these modified files if this check box is ticked.\n" @@ -2868,7 +2876,7 @@ msgid "" "Are you sure you want to use them?" msgstr "" -#: Client/core/CSettings.cpp:4633 +#: Client/core/CSettings.cpp:4666 msgid "" "Enabling DPI awareness is an experimental feature and\n" "we only recommend it when you play MTA:SA on a scaled monitor.\n" @@ -2877,77 +2885,77 @@ msgid "" "Are you sure you want to enable this option?" msgstr "" -#: Client/core/CSettings.cpp:4639 +#: Client/core/CSettings.cpp:4672 msgid "EXPERIMENTAL FEATURE" msgstr "" -#: Client/core/CSettings.cpp:4782 +#: Client/core/CSettings.cpp:4815 msgid "Please enter a nickname" msgstr "" -#: Client/core/CSettings.cpp:4783 +#: Client/core/CSettings.cpp:4816 msgid "" "Please enter a nickname to be used ingame. \n" "This will be your name when you connect to and play in a server" msgstr "" -#: Client/core/CSettings.cpp:4801 +#: Client/core/CSettings.cpp:4834 msgid "Very experimental feature." msgstr "" -#: Client/core/CSettings.cpp:4803 +#: Client/core/CSettings.cpp:4836 msgid "Stops stalls with CJ variations (Uses 65MB more RAM)" msgstr "" -#: Client/core/CSettings.cpp:4805 +#: Client/core/CSettings.cpp:4838 msgid "Older routers may require a slower scan speed." msgstr "" -#: Client/core/CSettings.cpp:4807 +#: Client/core/CSettings.cpp:4840 msgid "Switch on to use only one connection when downloading." msgstr "" -#: Client/core/CSettings.cpp:4809 +#: Client/core/CSettings.cpp:4842 msgid "Tag network packets to help ISPs identify MTA traffic." msgstr "" -#: Client/core/CSettings.cpp:4811 +#: Client/core/CSettings.cpp:4844 msgid "Spinning circle animation at the bottom of the screen" msgstr "" -#: Client/core/CSettings.cpp:4813 +#: Client/core/CSettings.cpp:4846 msgid "Select default always. (This setting is not saved)" msgstr "" -#: Client/core/CSettings.cpp:4815 +#: Client/core/CSettings.cpp:4848 msgid "Maximum is usually best" msgstr "" -#: Client/core/CSettings.cpp:4817 Client/core/CSettings.cpp:4819 +#: Client/core/CSettings.cpp:4850 Client/core/CSettings.cpp:4852 msgid "Auto updater:" msgstr "" -#: Client/core/CSettings.cpp:4817 +#: Client/core/CSettings.cpp:4850 msgid "Select default unless you like filling out bug reports." msgstr "" -#: Client/core/CSettings.cpp:4819 +#: Client/core/CSettings.cpp:4852 msgid "Select default to automatically install important updates." msgstr "" -#: Client/core/CSettings.cpp:4821 +#: Client/core/CSettings.cpp:4854 msgid "16-bit color:" msgstr "" -#: Client/core/CSettings.cpp:4821 +#: Client/core/CSettings.cpp:4854 msgid "Enable 16 bit color modes - Requires MTA restart" msgstr "" -#: Client/core/CSettings.cpp:4823 +#: Client/core/CSettings.cpp:4856 msgid "Mouse fix:" msgstr "" -#: Client/core/CSettings.cpp:4823 +#: Client/core/CSettings.cpp:4856 msgid "Mouse movement fix - May need PC restart" msgstr "" From 8e66bddd29fd7f2d566826022c286a9cbb31b3f0 Mon Sep 17 00:00:00 2001 From: Dutchman101 <12105539+Dutchman101@users.noreply.github.com> Date: Sun, 20 Oct 2024 07:44:09 +0000 Subject: [PATCH 06/16] Update CEF to 130.1.2+g48f3ef6+chromium-130.0.6723.44 --- utils/buildactions/install_cef.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/buildactions/install_cef.lua b/utils/buildactions/install_cef.lua index 65b686aa56..364bedf3e2 100644 --- a/utils/buildactions/install_cef.lua +++ b/utils/buildactions/install_cef.lua @@ -9,8 +9,8 @@ local CEF_URL_PREFIX = "https://cef-builds.spotifycdn.com/cef_binary_" local CEF_URL_SUFFIX = "_windows32_minimal.tar.bz2" -- Change here to update CEF version -local CEF_VERSION = "129.0.12+gf09539f+chromium-129.0.6668.101" -local CEF_HASH = "ec759dbfafafac2ae26f4960caad1c8464205a7787ec247e0fc21ab4620c8a5c" +local CEF_VERSION = "130.1.2+g48f3ef6+chromium-130.0.6723.44" +local CEF_HASH = "f436f0f23caa8167d14e8de331d15fbb534e411f4235895024c2e242510e8deb" function make_cef_download_url() return CEF_URL_PREFIX..http.escapeUrlParam(CEF_VERSION)..CEF_URL_SUFFIX From 9e804de1322d50aa2e0cea1c2960b05bbe3fd99b Mon Sep 17 00:00:00 2001 From: lopsi <40902730+Lpsd@users.noreply.github.com> Date: Tue, 22 Oct 2024 00:21:58 +0200 Subject: [PATCH 07/16] Remove CEF GPU compositing (#3821) --- Client/cefweb/CWebApp.cpp | 9 +++------ Client/cefweb/CWebCore.cpp | 8 +------- Client/cefweb/CWebCore.h | 4 +--- Client/core/CClientVariables.cpp | 1 - Client/core/CCore.cpp | 4 +--- Client/core/CSettings.cpp | 30 ++--------------------------- Client/core/CSettings.h | 2 -- Client/sdk/core/CWebCoreInterface.h | 3 +-- 8 files changed, 9 insertions(+), 52 deletions(-) diff --git a/Client/cefweb/CWebApp.cpp b/Client/cefweb/CWebApp.cpp index 6013d326d6..dde8e11863 100644 --- a/Client/cefweb/CWebApp.cpp +++ b/Client/cefweb/CWebApp.cpp @@ -23,13 +23,10 @@ void CWebApp::OnBeforeCommandLineProcessing(const CefString& process_type, CefRe { CWebCore* pWebCore = static_cast(g_pCore->GetWebCore()); - if (!pWebCore->GetGPUEnabled()) // if GPU is disabled... - { - command_line->AppendSwitch("disable-gpu-compositing"); + if (!pWebCore->GetGPUEnabled()) command_line->AppendSwitch("disable-gpu"); - } - else if (!pWebCore->GetGPUCompositingEnabled()) // if GPU is enabled, but compositing is disabled... - command_line->AppendSwitch("disable-gpu-compositing"); + + command_line->AppendSwitch("disable-gpu-compositing"); // always disable this, causes issues with official builds // command_line->AppendSwitch("disable-d3d11"); command_line->AppendSwitch("enable-begin-frame-scheduling"); diff --git a/Client/cefweb/CWebCore.cpp b/Client/cefweb/CWebCore.cpp index c30700b88b..bd26c68711 100644 --- a/Client/cefweb/CWebCore.cpp +++ b/Client/cefweb/CWebCore.cpp @@ -49,13 +49,12 @@ CWebCore::~CWebCore() delete m_pXmlConfig; } -bool CWebCore::Initialise(bool gpuEnabled, bool gpuCompositingEnabled) +bool CWebCore::Initialise(bool gpuEnabled) { CefMainArgs mainArgs; void* sandboxInfo = nullptr; m_bGPUEnabled = gpuEnabled; - m_bGPUCompositingEnabled = gpuCompositingEnabled; CefRefPtr app(new CWebApp); @@ -878,8 +877,3 @@ bool CWebCore::GetGPUEnabled() const noexcept { return m_bGPUEnabled; } - -bool CWebCore::GetGPUCompositingEnabled() const noexcept -{ - return m_bGPUCompositingEnabled; -} diff --git a/Client/cefweb/CWebCore.h b/Client/cefweb/CWebCore.h index 70a307372d..815e4b5815 100644 --- a/Client/cefweb/CWebCore.h +++ b/Client/cefweb/CWebCore.h @@ -54,7 +54,7 @@ class CWebCore : public CWebCoreInterface public: CWebCore(); ~CWebCore(); - bool Initialise(bool gpuEnabled, bool gpuCompositingEnabled) override; + bool Initialise(bool gpuEnabled) override; CWebViewInterface* CreateWebView(unsigned int uiWidth, unsigned int uiHeight, bool bIsLocal, CWebBrowserItem* pWebBrowserRenderItem, bool bTransparent); void DestroyWebView(CWebViewInterface* pWebViewInterface); @@ -109,7 +109,6 @@ class CWebCore : public CWebCoreInterface static void StaticFetchBlacklistFinished(const SHttpDownloadResult& result); bool GetGPUEnabled() const noexcept; - bool GetGPUCompositingEnabled() const noexcept; private: typedef std::pair WebFilterPair; @@ -135,5 +134,4 @@ class CWebCore : public CWebCoreInterface // Shouldn't be changed after init bool m_bGPUEnabled; - bool m_bGPUCompositingEnabled; }; diff --git a/Client/core/CClientVariables.cpp b/Client/core/CClientVariables.cpp index a64cf8f724..8019c2687b 100644 --- a/Client/core/CClientVariables.cpp +++ b/Client/core/CClientVariables.cpp @@ -359,7 +359,6 @@ void CClientVariables::LoadDefaults() DEFAULT("discord_rpc_share_data_firsttime", false); // Display the user data sharing consent dialog box - for the first time DEFAULT("_beta_qc_rightclick_command", _S("reconnect")); // Command to run when right clicking quick connect (beta - can be removed at any time) DEFAULT("browser_enable_gpu", true); // Enable GPU in CEF? (allows stuff like WebGL to function) - DEFAULT("browser_enable_gpu_compositing", true); // Enable GPU compositing in CEF? (required GPU enabled) if (!Exists("locale")) { diff --git a/Client/core/CCore.cpp b/Client/core/CCore.cpp index cc15103bef..12e8cf81d5 100644 --- a/Client/core/CCore.cpp +++ b/Client/core/CCore.cpp @@ -1156,13 +1156,11 @@ CWebCoreInterface* CCore::GetWebCore() if (m_pWebCore == nullptr) { bool gpuEnabled; - bool gpuCompositingEnabled; auto cvars = g_pCore->GetCVars(); cvars->Get("browser_enable_gpu", gpuEnabled); - cvars->Get("browser_enable_gpu_compositing", gpuCompositingEnabled); m_pWebCore = CreateModule(m_WebCoreModule, "CefWeb", "cefweb", "InitWebCoreInterface", this); - m_pWebCore->Initialise(gpuEnabled, gpuCompositingEnabled); + m_pWebCore->Initialise(gpuEnabled); } return m_pWebCore; } diff --git a/Client/core/CSettings.cpp b/Client/core/CSettings.cpp index 6bd1dcae0d..1cfe5c90eb 100644 --- a/Client/core/CSettings.cpp +++ b/Client/core/CSettings.cpp @@ -918,14 +918,8 @@ void CSettings::CreateGUI() m_pCheckBoxRemoteJavascript->AutoSize(NULL, 20.0f); m_pCheckBoxBrowserGPUEnabled = reinterpret_cast(pManager->CreateCheckBox(m_pTabBrowser, _("Enable GPU rendering"), true)); - m_pCheckBoxBrowserGPUEnabled->SetPosition(CVector2D(vecTemp.fX + 300.0f, vecTemp.fY - 20.0f)); + m_pCheckBoxBrowserGPUEnabled->SetPosition(CVector2D(vecTemp.fX + 300.0f, vecTemp.fY - 25.0f)); m_pCheckBoxBrowserGPUEnabled->AutoSize(NULL, 20.0f); - m_pCheckBoxBrowserGPUEnabled->SetClickHandler(GUI_CALLBACK(&CSettings::OnGPUSettingChanged, this)); - - m_pCheckBoxBrowserGPUCompositingEnabled = - reinterpret_cast(pManager->CreateCheckBox(m_pTabBrowser, _("Enable GPU compositing"), true)); - m_pCheckBoxBrowserGPUCompositingEnabled->SetPosition(CVector2D(vecTemp.fX + 300.0f, vecTemp.fY)); - m_pCheckBoxBrowserGPUCompositingEnabled->AutoSize(NULL, 20.0f); m_pLabelBrowserCustomBlacklist = reinterpret_cast(pManager->CreateLabel(m_pTabBrowser, _("Custom blacklist"))); m_pLabelBrowserCustomBlacklist->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 30.0f)); @@ -3300,12 +3294,6 @@ void CSettings::LoadData() CVARS_GET("browser_enable_gpu", bVar); m_pCheckBoxBrowserGPUEnabled->SetSelected(bVar); - if (!bVar) - m_pCheckBoxBrowserGPUCompositingEnabled->SetEnabled(false); - - CVARS_GET("browser_enable_gpu_compositing", bVar); - m_pCheckBoxBrowserGPUCompositingEnabled->SetSelected(bVar); - ReloadBrowserLists(); } @@ -3736,13 +3724,6 @@ void CSettings::SaveData() bool bBrowserGPUSettingChanged = (bBrowserGPUSetting != bBrowserGPUEnabled); CVARS_SET("browser_enable_gpu", bBrowserGPUSetting); - bool bBrowserGPUCompositingEnabled = false; - CVARS_GET("browser_enable_gpu_compositing", bBrowserGPUCompositingEnabled); - - bool bBrowserGPUCompositingSetting = m_pCheckBoxBrowserGPUCompositingEnabled->GetSelected(); - bool bBrowserGPUCompositingSettingChanged = (bBrowserGPUCompositingSetting != bBrowserGPUCompositingEnabled); - CVARS_SET("browser_enable_gpu_compositing", bBrowserGPUCompositingSetting); - // Ensure CVARS ranges ok CClientVariables::GetSingleton().ValidateValues(); @@ -3752,8 +3733,7 @@ void CSettings::SaveData() gameSettings->Save(); // Ask to restart? - if (bIsVideoModeChanged || bIsAntiAliasingChanged || bIsCustomizedSAFilesChanged || processsDPIAwareChanged || bBrowserGPUSettingChanged || - bBrowserGPUCompositingSettingChanged) + if (bIsVideoModeChanged || bIsAntiAliasingChanged || bIsCustomizedSAFilesChanged || processsDPIAwareChanged || bBrowserGPUSettingChanged) ShowRestartQuestion(); else if (CModManager::GetSingleton().IsLoaded() && bBrowserSettingChanged) ShowDisconnectQuestion(); @@ -4906,9 +4886,3 @@ bool CSettings::IsActive() { return m_pWindow->IsActive(); } - -bool CSettings::OnGPUSettingChanged(CGUIElement* pElement) -{ - m_pCheckBoxBrowserGPUCompositingEnabled->SetEnabled(m_pCheckBoxBrowserGPUEnabled->GetSelected()); - return true; -} diff --git a/Client/core/CSettings.h b/Client/core/CSettings.h index 014590b80c..db6c077df4 100644 --- a/Client/core/CSettings.h +++ b/Client/core/CSettings.h @@ -339,7 +339,6 @@ class CSettings CGUIGridList* m_pGridBrowserWhitelist; CGUIButton* m_pButtonBrowserWhitelistRemove; CGUICheckBox* m_pCheckBoxBrowserGPUEnabled; - CGUICheckBox* m_pCheckBoxBrowserGPUCompositingEnabled; bool m_bBrowserListsChanged; bool m_bBrowserListsLoadEnabled; @@ -384,7 +383,6 @@ class CSettings bool OnBrowserWhitelistRemove(CGUIElement* pElement); bool OnBrowserWhitelistDomainAddFocused(CGUIElement* pElement); bool OnBrowserWhitelistDomainAddDefocused(CGUIElement* pElement); - bool OnGPUSettingChanged(CGUIElement* pElement); bool OnMouseDoubleClick(CGUIMouseEventArgs Args); diff --git a/Client/sdk/core/CWebCoreInterface.h b/Client/sdk/core/CWebCoreInterface.h index 6bac4b777e..6b95690756 100644 --- a/Client/sdk/core/CWebCoreInterface.h +++ b/Client/sdk/core/CWebCoreInterface.h @@ -49,7 +49,7 @@ class CWebCoreInterface { public: virtual ~CWebCoreInterface() {} - virtual bool Initialise(bool gpuEnabled, bool gpuCompositingEnabled) = 0; + virtual bool Initialise(bool gpuEnabled) = 0; virtual CWebViewInterface* CreateWebView(unsigned int uiWidth, unsigned int uiHeight, bool bIsLocal, CWebBrowserItem* pWebBrowserRenderItem, bool bTransparent) = 0; @@ -92,5 +92,4 @@ class CWebCoreInterface eWebFilterState state = eWebFilterState::WEBFILTER_ALL) = 0; virtual bool GetGPUEnabled() const noexcept = 0; - virtual bool GetGPUCompositingEnabled() const noexcept = 0; }; From 792d9aa6bbd6bdc451f3e78afacda5fdeb5df11b Mon Sep 17 00:00:00 2001 From: Pot Bot <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 22:24:06 +0000 Subject: [PATCH 08/16] Update client en_US pot [ci skip] --- .../MTA/locale/en_US/client.pot | 416 +++++++++--------- 1 file changed, 206 insertions(+), 210 deletions(-) diff --git a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot index 8c1697efff..5d498383f8 100644 --- a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot +++ b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MTA San Andreas 1.x\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-20 07:42+0000\n" +"POT-Creation-Date: 2024-10-21 22:24+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -35,7 +35,7 @@ msgstr "" msgid "Remember decision" msgstr "" -#: Client/cefweb/CWebsiteRequests.cpp:51 Client/core/CSettings.cpp:984 +#: Client/cefweb/CWebsiteRequests.cpp:51 Client/core/CSettings.cpp:978 msgid "Allow" msgstr "" @@ -160,7 +160,7 @@ msgstr "" #: Client/mods/deathmatch/logic/CResource.cpp:375 #: Client/mods/deathmatch/logic/CClientGame.cpp:1089 Client/core/CCore.cpp:674 -#: Client/core/CSettings.cpp:3501 +#: Client/core/CSettings.cpp:3489 msgid "In-game" msgstr "" @@ -275,7 +275,7 @@ msgstr "" #: Client/mods/deathmatch/logic/CClientGame.cpp:533 #: Client/core/CMainMenu.cpp:304 Client/core/CCore.cpp:674 -#: Client/core/CSettings.cpp:3497 +#: Client/core/CSettings.cpp:3485 msgid "Main menu" msgstr "" @@ -298,10 +298,10 @@ msgstr "" #: Client/loader/MainFunctions.cpp:252 Client/loader/MainFunctions.cpp:267 #: Client/loader/MainFunctions.cpp:269 Client/loader/MainFunctions.cpp:846 #: Client/loader/CInstallManager.cpp:552 Client/loader/CInstallManager.cpp:561 -#: Client/core/CGUI.cpp:93 Client/core/CCore.cpp:1281 -#: Client/core/CCore.cpp:1294 Client/core/CSettings.cpp:2951 -#: Client/core/CSettings.cpp:4199 Client/core/CSettings.cpp:4227 -#: Client/core/CSettings.cpp:4797 Client/core/CConnectManager.cpp:80 +#: Client/core/CGUI.cpp:93 Client/core/CCore.cpp:1279 +#: Client/core/CCore.cpp:1292 Client/core/CSettings.cpp:2945 +#: Client/core/CSettings.cpp:4179 Client/core/CSettings.cpp:4207 +#: Client/core/CSettings.cpp:4777 Client/core/CConnectManager.cpp:80 #: Client/core/CConnectManager.cpp:111 Client/core/CConnectManager.cpp:127 #: Client/core/CConnectManager.cpp:263 Client/core/CConnectManager.cpp:321 #: Client/core/CConnectManager.cpp:404 Client/core/CConnectManager.cpp:411 @@ -678,7 +678,7 @@ msgstr "" #. * #: Client/mods/deathmatch/logic/CLocalServer.cpp:51 #: Client/core/CSettings.cpp:442 Client/core/CSettings.cpp:630 -#: Client/core/CSettings.cpp:904 Client/core/CSettings.cpp:2028 +#: Client/core/CSettings.cpp:904 Client/core/CSettings.cpp:2022 msgid "General" msgstr "" @@ -734,7 +734,7 @@ msgstr "" #: Client/gui/CGUIMessageBox_Impl.cpp:68 Client/loader/Dialogs.cpp:136 #: Client/core/CVersionUpdater.cpp:1790 Client/core/CVersionUpdater.cpp:1806 #: Client/core/CVersionUpdater.cpp:1841 Client/core/CSettings.cpp:132 -#: Client/core/CSettings.cpp:4817 +#: Client/core/CSettings.cpp:4797 msgid "Cancel" msgstr "" @@ -770,7 +770,7 @@ msgstr "" #: Client/core/CVersionUpdater.cpp:1956 Client/core/CVersionUpdater.cpp:1968 #: Client/core/CVersionUpdater.cpp:2120 Client/core/CVersionUpdater.cpp:2129 #: Client/core/CVersionUpdater.cpp:2138 Client/core/CVersionUpdater.cpp:2152 -#: Client/core/CSettings.cpp:127 Client/core/CSettings.cpp:4818 +#: Client/core/CSettings.cpp:127 Client/core/CSettings.cpp:4798 msgid "OK" msgstr "" @@ -784,9 +784,9 @@ msgstr "" #: Client/core/CVersionUpdater.cpp:1572 Client/core/CVersionUpdater.cpp:1590 #: Client/core/CVersionUpdater.cpp:1859 Client/core/CVersionUpdater.cpp:1878 #: Client/core/CQuestionBox.cpp:195 Client/core/CMainMenu.cpp:1200 -#: Client/core/CSettings.cpp:1399 Client/core/CSettings.cpp:1423 -#: Client/core/CSettings.cpp:4522 Client/core/CSettings.cpp:4596 -#: Client/core/CSettings.cpp:4626 Client/core/CSettings.cpp:4675 +#: Client/core/CSettings.cpp:1393 Client/core/CSettings.cpp:1417 +#: Client/core/CSettings.cpp:4502 Client/core/CSettings.cpp:4576 +#: Client/core/CSettings.cpp:4606 Client/core/CSettings.cpp:4655 #: Client/core/ServerBrowser/CServerInfo.cpp:481 msgid "Yes" msgstr "" @@ -913,10 +913,10 @@ msgstr "" #: Client/loader/Dialogs.cpp:132 Client/core/CVersionUpdater.cpp:1571 #: Client/core/CVersionUpdater.cpp:1589 Client/core/CVersionUpdater.cpp:1858 #: Client/core/CVersionUpdater.cpp:1877 Client/core/CQuestionBox.cpp:194 -#: Client/core/CMainMenu.cpp:1199 Client/core/CSettings.cpp:1398 -#: Client/core/CSettings.cpp:1422 Client/core/CSettings.cpp:4521 -#: Client/core/CSettings.cpp:4595 Client/core/CSettings.cpp:4625 -#: Client/core/CSettings.cpp:4674 Client/core/ServerBrowser/CServerInfo.cpp:481 +#: Client/core/CMainMenu.cpp:1199 Client/core/CSettings.cpp:1392 +#: Client/core/CSettings.cpp:1416 Client/core/CSettings.cpp:4501 +#: Client/core/CSettings.cpp:4575 Client/core/CSettings.cpp:4605 +#: Client/core/CSettings.cpp:4654 Client/core/ServerBrowser/CServerInfo.cpp:481 msgid "No" msgstr "" @@ -1123,12 +1123,12 @@ msgid "" msgstr "" #: Client/loader/MainFunctions.cpp:389 Client/core/CSettings.cpp:662 -#: Client/core/CSettings.cpp:1014 +#: Client/core/CSettings.cpp:1008 msgid "Fullscreen mode:" msgstr "" #: Client/loader/MainFunctions.cpp:389 Client/core/CSettings.cpp:670 -#: Client/core/CSettings.cpp:1625 +#: Client/core/CSettings.cpp:1619 msgid "Borderless window" msgstr "" @@ -1516,7 +1516,7 @@ msgstr "" msgid " - Unknown problem in _DialogUpdateResult" msgstr "" -#: Client/core/CVersionUpdater.cpp:2081 Client/core/CSettings.cpp:4623 +#: Client/core/CVersionUpdater.cpp:2081 Client/core/CSettings.cpp:4603 msgid "CUSTOMIZED GTA:SA FILES" msgstr "" @@ -1569,13 +1569,13 @@ msgstr "" msgid "Backwards" msgstr "" -#: Client/core/CKeyBinds.cpp:191 Client/core/CSettings.cpp:2250 -#: Client/core/CSettings.cpp:2278 +#: Client/core/CKeyBinds.cpp:191 Client/core/CSettings.cpp:2244 +#: Client/core/CSettings.cpp:2272 msgid "Left" msgstr "" -#: Client/core/CKeyBinds.cpp:192 Client/core/CSettings.cpp:2252 -#: Client/core/CSettings.cpp:2279 +#: Client/core/CKeyBinds.cpp:192 Client/core/CSettings.cpp:2246 +#: Client/core/CSettings.cpp:2273 msgid "Right" msgstr "" @@ -1895,102 +1895,102 @@ msgstr "" msgid "%s module is incorrect!" msgstr "" -#: Client/core/CCore.cpp:1281 +#: Client/core/CCore.cpp:1279 msgid "Error executing URL" msgstr "" -#: Client/core/CCore.cpp:1293 +#: Client/core/CCore.cpp:1291 #, c-format msgid "Error running mod specified in command line ('%s')" msgstr "" #. m_pCommands->Add ( "e", CCommandFuncs::Editor ); #. m_pCommands->Add ( "clear", CCommandFuncs::Clear ); -#: Client/core/CCore.cpp:1395 +#: Client/core/CCore.cpp:1393 msgid "this help screen" msgstr "" -#: Client/core/CCore.cpp:1396 Client/core/CCore.cpp:1397 +#: Client/core/CCore.cpp:1394 Client/core/CCore.cpp:1395 msgid "exits the application" msgstr "" -#: Client/core/CCore.cpp:1398 +#: Client/core/CCore.cpp:1396 msgid "shows the version" msgstr "" -#: Client/core/CCore.cpp:1399 +#: Client/core/CCore.cpp:1397 msgid "shows the time" msgstr "" -#: Client/core/CCore.cpp:1400 +#: Client/core/CCore.cpp:1398 msgid "shows the hud" msgstr "" -#: Client/core/CCore.cpp:1401 +#: Client/core/CCore.cpp:1399 msgid "shows all the binds" msgstr "" -#: Client/core/CCore.cpp:1402 +#: Client/core/CCore.cpp:1400 msgid "shows your serial" msgstr "" -#: Client/core/CCore.cpp:1411 +#: Client/core/CCore.cpp:1409 msgid "connects to a server (host port nick pass)" msgstr "" -#: Client/core/CCore.cpp:1412 +#: Client/core/CCore.cpp:1410 msgid "connects to a previous server" msgstr "" -#: Client/core/CCore.cpp:1413 +#: Client/core/CCore.cpp:1411 msgid "binds a key (key control)" msgstr "" -#: Client/core/CCore.cpp:1414 +#: Client/core/CCore.cpp:1412 msgid "unbinds a key (key)" msgstr "" -#: Client/core/CCore.cpp:1415 +#: Client/core/CCore.cpp:1413 msgid "copies the default gta controls" msgstr "" -#: Client/core/CCore.cpp:1416 +#: Client/core/CCore.cpp:1414 msgid "outputs a screenshot" msgstr "" -#: Client/core/CCore.cpp:1417 +#: Client/core/CCore.cpp:1415 msgid "immediately saves the config" msgstr "" -#: Client/core/CCore.cpp:1419 +#: Client/core/CCore.cpp:1417 msgid "clears the debug view" msgstr "" -#: Client/core/CCore.cpp:1420 +#: Client/core/CCore.cpp:1418 msgid "scrolls the chatbox upwards" msgstr "" -#: Client/core/CCore.cpp:1421 +#: Client/core/CCore.cpp:1419 msgid "scrolls the chatbox downwards" msgstr "" -#: Client/core/CCore.cpp:1422 +#: Client/core/CCore.cpp:1420 msgid "scrolls the debug view upwards" msgstr "" -#: Client/core/CCore.cpp:1423 +#: Client/core/CCore.cpp:1421 msgid "scrolls the debug view downwards" msgstr "" -#: Client/core/CCore.cpp:1426 +#: Client/core/CCore.cpp:1424 msgid "shows the memory statistics" msgstr "" -#: Client/core/CCore.cpp:1427 +#: Client/core/CCore.cpp:1425 msgid "shows the frame timing graph" msgstr "" -#: Client/core/CCore.cpp:1431 +#: Client/core/CCore.cpp:1429 msgid "for developers: reload news" msgstr "" @@ -2196,15 +2196,15 @@ msgstr "" msgid "Usertrack options" msgstr "" -#: Client/core/CSettings.cpp:573 Client/core/CSettings.cpp:3097 +#: Client/core/CSettings.cpp:573 Client/core/CSettings.cpp:3091 msgid "Radio" msgstr "" -#: Client/core/CSettings.cpp:574 Client/core/CSettings.cpp:3099 +#: Client/core/CSettings.cpp:574 Client/core/CSettings.cpp:3093 msgid "Random" msgstr "" -#: Client/core/CSettings.cpp:575 Client/core/CSettings.cpp:3101 +#: Client/core/CSettings.cpp:575 Client/core/CSettings.cpp:3095 msgid "Sequential" msgstr "" @@ -2279,11 +2279,11 @@ msgstr "" msgid "DPI aware" msgstr "" -#: Client/core/CSettings.cpp:669 Client/core/CSettings.cpp:1623 +#: Client/core/CSettings.cpp:669 Client/core/CSettings.cpp:1617 msgid "Standard" msgstr "" -#: Client/core/CSettings.cpp:671 Client/core/CSettings.cpp:1627 +#: Client/core/CSettings.cpp:671 Client/core/CSettings.cpp:1621 msgid "Borderless keep res" msgstr "" @@ -2291,57 +2291,57 @@ msgstr "" msgid "Mip Mapping" msgstr "" -#: Client/core/CSettings.cpp:743 Client/core/CSettings.cpp:1527 +#: Client/core/CSettings.cpp:743 Client/core/CSettings.cpp:1521 msgid "Low" msgstr "" -#: Client/core/CSettings.cpp:744 Client/core/CSettings.cpp:1529 +#: Client/core/CSettings.cpp:744 Client/core/CSettings.cpp:1523 msgid "Medium" msgstr "" -#: Client/core/CSettings.cpp:745 Client/core/CSettings.cpp:1096 -#: Client/core/CSettings.cpp:1531 Client/core/CSettings.cpp:3155 +#: Client/core/CSettings.cpp:745 Client/core/CSettings.cpp:1090 +#: Client/core/CSettings.cpp:1525 Client/core/CSettings.cpp:3149 msgid "High" msgstr "" -#: Client/core/CSettings.cpp:746 Client/core/CSettings.cpp:1533 +#: Client/core/CSettings.cpp:746 Client/core/CSettings.cpp:1527 msgid "Very high" msgstr "" #: Client/core/CSettings.cpp:761 Client/core/CSettings.cpp:784 -#: Client/core/CSettings.cpp:1027 Client/core/CSettings.cpp:1081 -#: Client/core/CSettings.cpp:1211 Client/core/CSettings.cpp:1537 -#: Client/core/CSettings.cpp:3162 Client/core/CSettings.cpp:3194 -#: Client/core/CSettings.cpp:3216 Client/core/CSettings.cpp:4267 +#: Client/core/CSettings.cpp:1021 Client/core/CSettings.cpp:1075 +#: Client/core/CSettings.cpp:1205 Client/core/CSettings.cpp:1531 +#: Client/core/CSettings.cpp:3156 Client/core/CSettings.cpp:3188 +#: Client/core/CSettings.cpp:3210 Client/core/CSettings.cpp:4247 msgid "Off" msgstr "" -#: Client/core/CSettings.cpp:785 Client/core/CSettings.cpp:1539 +#: Client/core/CSettings.cpp:785 Client/core/CSettings.cpp:1533 msgid "1x" msgstr "" -#: Client/core/CSettings.cpp:786 Client/core/CSettings.cpp:1541 +#: Client/core/CSettings.cpp:786 Client/core/CSettings.cpp:1535 msgid "2x" msgstr "" -#: Client/core/CSettings.cpp:787 Client/core/CSettings.cpp:1543 +#: Client/core/CSettings.cpp:787 Client/core/CSettings.cpp:1537 msgid "3x" msgstr "" -#: Client/core/CSettings.cpp:800 Client/core/CSettings.cpp:1029 -#: Client/core/CSettings.cpp:1549 Client/core/CSettings.cpp:3164 +#: Client/core/CSettings.cpp:800 Client/core/CSettings.cpp:1023 +#: Client/core/CSettings.cpp:1543 Client/core/CSettings.cpp:3158 msgid "Auto" msgstr "" -#: Client/core/CSettings.cpp:801 Client/core/CSettings.cpp:1551 +#: Client/core/CSettings.cpp:801 Client/core/CSettings.cpp:1545 msgid "4:3" msgstr "" -#: Client/core/CSettings.cpp:802 Client/core/CSettings.cpp:1553 +#: Client/core/CSettings.cpp:802 Client/core/CSettings.cpp:1547 msgid "16:10" msgstr "" -#: Client/core/CSettings.cpp:803 Client/core/CSettings.cpp:1555 +#: Client/core/CSettings.cpp:803 Client/core/CSettings.cpp:1549 msgid "16:9" msgstr "" @@ -2409,354 +2409,350 @@ msgstr "" msgid "Enable GPU rendering" msgstr "" -#: Client/core/CSettings.cpp:926 -msgid "Enable GPU compositing" -msgstr "" - -#: Client/core/CSettings.cpp:930 +#: Client/core/CSettings.cpp:924 msgid "Custom blacklist" msgstr "" -#: Client/core/CSettings.cpp:941 Client/core/CSettings.cpp:976 +#: Client/core/CSettings.cpp:935 Client/core/CSettings.cpp:970 msgid "Enter a domain e.g. google.com" msgstr "" -#: Client/core/CSettings.cpp:949 +#: Client/core/CSettings.cpp:943 msgid "Block" msgstr "" -#: Client/core/CSettings.cpp:957 Client/core/CSettings.cpp:992 +#: Client/core/CSettings.cpp:951 Client/core/CSettings.cpp:986 msgid "Domain" msgstr "" -#: Client/core/CSettings.cpp:959 Client/core/CSettings.cpp:994 +#: Client/core/CSettings.cpp:953 Client/core/CSettings.cpp:988 msgid "Remove domain" msgstr "" #. Reset vecTemp -#: Client/core/CSettings.cpp:965 +#: Client/core/CSettings.cpp:959 msgid "Custom whitelist" msgstr "" #. Misc section label -#: Client/core/CSettings.cpp:1007 +#: Client/core/CSettings.cpp:1001 msgid "Misc" msgstr "" #. Fast clothes loading -#: Client/core/CSettings.cpp:1013 Client/core/CSettings.cpp:1020 -#: Client/core/CSettings.cpp:4836 +#: Client/core/CSettings.cpp:1007 Client/core/CSettings.cpp:1014 +#: Client/core/CSettings.cpp:4816 msgid "Fast CJ clothes loading:" msgstr "" #. Browser scan speed -#: Client/core/CSettings.cpp:1013 Client/core/CSettings.cpp:1034 -#: Client/core/CSettings.cpp:4838 +#: Client/core/CSettings.cpp:1007 Client/core/CSettings.cpp:1028 +#: Client/core/CSettings.cpp:4818 msgid "Browser speed:" msgstr "" #. Single download -#: Client/core/CSettings.cpp:1013 Client/core/CSettings.cpp:1048 -#: Client/core/CSettings.cpp:4840 +#: Client/core/CSettings.cpp:1007 Client/core/CSettings.cpp:1042 +#: Client/core/CSettings.cpp:4820 msgid "Single connection:" msgstr "" #. Packet tag -#: Client/core/CSettings.cpp:1013 Client/core/CSettings.cpp:1061 -#: Client/core/CSettings.cpp:4842 +#: Client/core/CSettings.cpp:1007 Client/core/CSettings.cpp:1055 +#: Client/core/CSettings.cpp:4822 msgid "Packet tag:" msgstr "" #. Progress animation -#: Client/core/CSettings.cpp:1014 Client/core/CSettings.cpp:1074 -#: Client/core/CSettings.cpp:4844 +#: Client/core/CSettings.cpp:1008 Client/core/CSettings.cpp:1068 +#: Client/core/CSettings.cpp:4824 msgid "Progress animation:" msgstr "" #. Process priority -#: Client/core/CSettings.cpp:1014 Client/core/CSettings.cpp:1087 -#: Client/core/CSettings.cpp:4834 +#: Client/core/CSettings.cpp:1008 Client/core/CSettings.cpp:1081 +#: Client/core/CSettings.cpp:4814 msgid "Process priority:" msgstr "" #. Debug setting -#: Client/core/CSettings.cpp:1014 Client/core/CSettings.cpp:1101 -#: Client/core/CSettings.cpp:4846 +#: Client/core/CSettings.cpp:1008 Client/core/CSettings.cpp:1095 +#: Client/core/CSettings.cpp:4826 msgid "Debug setting:" msgstr "" #. Streaming memory -#: Client/core/CSettings.cpp:1015 Client/core/CSettings.cpp:1124 -#: Client/core/CSettings.cpp:4848 +#: Client/core/CSettings.cpp:1009 Client/core/CSettings.cpp:1118 +#: Client/core/CSettings.cpp:4828 msgid "Streaming memory:" msgstr "" #. Update build type -#: Client/core/CSettings.cpp:1015 Client/core/CSettings.cpp:1225 +#: Client/core/CSettings.cpp:1009 Client/core/CSettings.cpp:1219 msgid "Update build type:" msgstr "" #. UpdateAutoInstall -#: Client/core/CSettings.cpp:1015 Client/core/CSettings.cpp:1204 +#: Client/core/CSettings.cpp:1009 Client/core/CSettings.cpp:1198 msgid "Install important updates:" msgstr "" -#: Client/core/CSettings.cpp:1028 Client/core/CSettings.cpp:1056 -#: Client/core/CSettings.cpp:1069 Client/core/CSettings.cpp:3166 -#: Client/core/CSettings.cpp:3182 Client/core/CSettings.cpp:3189 +#: Client/core/CSettings.cpp:1022 Client/core/CSettings.cpp:1050 +#: Client/core/CSettings.cpp:1063 Client/core/CSettings.cpp:3160 +#: Client/core/CSettings.cpp:3176 Client/core/CSettings.cpp:3183 msgid "On" msgstr "" -#: Client/core/CSettings.cpp:1041 Client/core/CSettings.cpp:3171 +#: Client/core/CSettings.cpp:1035 Client/core/CSettings.cpp:3165 msgid "Very slow" msgstr "" -#: Client/core/CSettings.cpp:1042 Client/core/CSettings.cpp:1055 -#: Client/core/CSettings.cpp:1068 Client/core/CSettings.cpp:1082 -#: Client/core/CSettings.cpp:1108 Client/core/CSettings.cpp:1120 -#: Client/core/CSettings.cpp:1212 Client/core/CSettings.cpp:1232 -#: Client/core/CSettings.cpp:3173 Client/core/CSettings.cpp:3180 -#: Client/core/CSettings.cpp:3187 Client/core/CSettings.cpp:3196 -#: Client/core/CSettings.cpp:3209 +#: Client/core/CSettings.cpp:1036 Client/core/CSettings.cpp:1049 +#: Client/core/CSettings.cpp:1062 Client/core/CSettings.cpp:1076 +#: Client/core/CSettings.cpp:1102 Client/core/CSettings.cpp:1114 +#: Client/core/CSettings.cpp:1206 Client/core/CSettings.cpp:1226 +#: Client/core/CSettings.cpp:3167 Client/core/CSettings.cpp:3174 +#: Client/core/CSettings.cpp:3181 Client/core/CSettings.cpp:3190 +#: Client/core/CSettings.cpp:3203 msgid "Default" msgstr "" -#: Client/core/CSettings.cpp:1043 Client/core/CSettings.cpp:3175 +#: Client/core/CSettings.cpp:1037 Client/core/CSettings.cpp:3169 msgid "Fast" msgstr "" -#: Client/core/CSettings.cpp:1094 Client/core/CSettings.cpp:3151 +#: Client/core/CSettings.cpp:1088 Client/core/CSettings.cpp:3145 msgid "Normal" msgstr "" -#: Client/core/CSettings.cpp:1095 Client/core/CSettings.cpp:3153 +#: Client/core/CSettings.cpp:1089 Client/core/CSettings.cpp:3147 msgid "Above normal" msgstr "" -#: Client/core/CSettings.cpp:1131 +#: Client/core/CSettings.cpp:1125 msgid "Min" msgstr "" -#: Client/core/CSettings.cpp:1144 +#: Client/core/CSettings.cpp:1138 msgid "Max" msgstr "" #. Windows 8 compatibility -#: Client/core/CSettings.cpp:1151 +#: Client/core/CSettings.cpp:1145 msgid "Windows 8 compatibility:" msgstr "" -#: Client/core/CSettings.cpp:1155 +#: Client/core/CSettings.cpp:1149 msgid "16-bit color" msgstr "" -#: Client/core/CSettings.cpp:1160 +#: Client/core/CSettings.cpp:1154 msgid "Mouse fix" msgstr "" #. Cache path info -#: Client/core/CSettings.cpp:1178 +#: Client/core/CSettings.cpp:1172 msgid "Client resource files:" msgstr "" -#: Client/core/CSettings.cpp:1182 +#: Client/core/CSettings.cpp:1176 msgid "Show in Explorer" msgstr "" #. Auto updater section label -#: Client/core/CSettings.cpp:1197 Client/core/CSettings.cpp:1200 +#: Client/core/CSettings.cpp:1191 Client/core/CSettings.cpp:1194 msgid "Auto updater" msgstr "" #. Check for updates -#: Client/core/CSettings.cpp:1238 +#: Client/core/CSettings.cpp:1232 msgid "Check for update now" msgstr "" -#: Client/core/CSettings.cpp:1392 +#: Client/core/CSettings.cpp:1386 msgid "Some settings will be changed when you next start MTA" msgstr "" -#: Client/core/CSettings.cpp:1393 +#: Client/core/CSettings.cpp:1387 msgid "" "\n" "\n" "Do you want to restart now?" msgstr "" -#: Client/core/CSettings.cpp:1396 +#: Client/core/CSettings.cpp:1390 msgid "RESTART REQUIRED" msgstr "" -#: Client/core/CSettings.cpp:1416 +#: Client/core/CSettings.cpp:1410 msgid "Some settings will be changed when you disconnect the current server" msgstr "" -#: Client/core/CSettings.cpp:1417 +#: Client/core/CSettings.cpp:1411 msgid "" "\n" "\n" "Do you want to disconnect now?" msgstr "" -#: Client/core/CSettings.cpp:1420 +#: Client/core/CSettings.cpp:1414 msgid "DISCONNECT REQUIRED" msgstr "" #. Update the joystick name -#: Client/core/CSettings.cpp:1747 +#: Client/core/CSettings.cpp:1741 msgid "Joypad not detected - Check connections and restart game" msgstr "" -#: Client/core/CSettings.cpp:1942 +#: Client/core/CSettings.cpp:1936 msgid "Binding axis" msgstr "" -#: Client/core/CSettings.cpp:1942 +#: Client/core/CSettings.cpp:1936 msgid "Move an axis to bind, or escape to clear" msgstr "" -#: Client/core/CSettings.cpp:2019 +#: Client/core/CSettings.cpp:2013 msgid "Language:" msgstr "" -#: Client/core/CSettings.cpp:2019 +#: Client/core/CSettings.cpp:2013 msgid "Skin:" msgstr "" -#: Client/core/CSettings.cpp:2019 +#: Client/core/CSettings.cpp:2013 msgid "Presets:" msgstr "" -#: Client/core/CSettings.cpp:2068 +#: Client/core/CSettings.cpp:2062 msgid "Chat" msgstr "" -#: Client/core/CSettings.cpp:2085 +#: Client/core/CSettings.cpp:2079 msgid "Load" msgstr "" -#: Client/core/CSettings.cpp:2097 +#: Client/core/CSettings.cpp:2091 msgid "Colors" msgstr "" -#: Client/core/CSettings.cpp:2098 +#: Client/core/CSettings.cpp:2092 msgid "Layout" msgstr "" -#: Client/core/CSettings.cpp:2099 Client/core/CSettings.cpp:2345 +#: Client/core/CSettings.cpp:2093 Client/core/CSettings.cpp:2339 msgid "Options" msgstr "" -#: Client/core/CSettings.cpp:2105 +#: Client/core/CSettings.cpp:2099 msgid "Chat Background" msgstr "" -#: Client/core/CSettings.cpp:2105 +#: Client/core/CSettings.cpp:2099 msgid "Chat Text" msgstr "" -#: Client/core/CSettings.cpp:2105 +#: Client/core/CSettings.cpp:2099 msgid "Input Background" msgstr "" -#: Client/core/CSettings.cpp:2105 +#: Client/core/CSettings.cpp:2099 msgid "Input Text" msgstr "" -#: Client/core/CSettings.cpp:2128 +#: Client/core/CSettings.cpp:2122 msgid "Lines:" msgstr "" -#: Client/core/CSettings.cpp:2128 +#: Client/core/CSettings.cpp:2122 msgid "Scale:" msgstr "" -#: Client/core/CSettings.cpp:2128 +#: Client/core/CSettings.cpp:2122 msgid "Width:" msgstr "" -#: Client/core/CSettings.cpp:2131 +#: Client/core/CSettings.cpp:2125 msgid "Size" msgstr "" -#: Client/core/CSettings.cpp:2180 +#: Client/core/CSettings.cpp:2174 msgid "after" msgstr "" -#: Client/core/CSettings.cpp:2180 +#: Client/core/CSettings.cpp:2174 msgid "for" msgstr "" -#: Client/core/CSettings.cpp:2180 +#: Client/core/CSettings.cpp:2174 msgid "sec" msgstr "" -#: Client/core/CSettings.cpp:2183 +#: Client/core/CSettings.cpp:2177 msgid "Fading" msgstr "" -#: Client/core/CSettings.cpp:2189 +#: Client/core/CSettings.cpp:2183 msgid "Fade out old lines" msgstr "" -#: Client/core/CSettings.cpp:2229 +#: Client/core/CSettings.cpp:2223 msgid "Horizontal:" msgstr "" -#: Client/core/CSettings.cpp:2229 +#: Client/core/CSettings.cpp:2223 msgid "Vertical:" msgstr "" -#: Client/core/CSettings.cpp:2229 +#: Client/core/CSettings.cpp:2223 msgid "Text-Align:" msgstr "" -#: Client/core/CSettings.cpp:2229 +#: Client/core/CSettings.cpp:2223 msgid "X-Offset:" msgstr "" -#: Client/core/CSettings.cpp:2230 +#: Client/core/CSettings.cpp:2224 msgid "Y-Offset:" msgstr "" -#: Client/core/CSettings.cpp:2236 +#: Client/core/CSettings.cpp:2230 msgid "Position" msgstr "" -#: Client/core/CSettings.cpp:2251 Client/core/CSettings.cpp:2265 +#: Client/core/CSettings.cpp:2245 Client/core/CSettings.cpp:2259 msgid "Center" msgstr "" -#: Client/core/CSettings.cpp:2264 +#: Client/core/CSettings.cpp:2258 msgid "Top" msgstr "" -#: Client/core/CSettings.cpp:2266 +#: Client/core/CSettings.cpp:2260 msgid "Bottom" msgstr "" -#: Client/core/CSettings.cpp:2314 +#: Client/core/CSettings.cpp:2308 msgid "Font" msgstr "" -#: Client/core/CSettings.cpp:2351 +#: Client/core/CSettings.cpp:2345 msgid "Hide background when not typing" msgstr "" -#: Client/core/CSettings.cpp:2356 +#: Client/core/CSettings.cpp:2350 msgid "Nickname completion using the \"Tab\" key" msgstr "" -#: Client/core/CSettings.cpp:2361 +#: Client/core/CSettings.cpp:2355 msgid "Allow server to flash the window" msgstr "" -#: Client/core/CSettings.cpp:2366 +#: Client/core/CSettings.cpp:2360 msgid "Allow tray balloon notifications" msgstr "" -#: Client/core/CSettings.cpp:2371 +#: Client/core/CSettings.cpp:2365 msgid "Chat text black/white outline" msgstr "" @@ -2764,85 +2760,85 @@ msgstr "" #. SString strText = SString::Printf ( "Press a key to bind to '%s'", pItemBind->GetText ().c_str () ); #. Create a messagebox to notify the user #. sSString strText = SString::Printf ( "Press a key to bind to '%s'", pItemBind->GetText ().c_str () ); -#: Client/core/CSettings.cpp:2620 Client/core/CSettings.cpp:2627 +#: Client/core/CSettings.cpp:2614 Client/core/CSettings.cpp:2621 msgid "Press a key to bind, or escape to clear" msgstr "" -#: Client/core/CSettings.cpp:2621 +#: Client/core/CSettings.cpp:2615 msgid "Binding a primary key" msgstr "" -#: Client/core/CSettings.cpp:2628 +#: Client/core/CSettings.cpp:2622 msgid "Binding a secondary key" msgstr "" -#: Client/core/CSettings.cpp:2704 +#: Client/core/CSettings.cpp:2698 msgid "GTA GAME CONTROLS" msgstr "" -#: Client/core/CSettings.cpp:2706 +#: Client/core/CSettings.cpp:2700 msgid "MULTIPLAYER CONTROLS" msgstr "" -#: Client/core/CSettings.cpp:2951 Client/core/CSettings.cpp:4797 +#: Client/core/CSettings.cpp:2945 Client/core/CSettings.cpp:4777 msgid "Your nickname contains invalid characters!" msgstr "" -#: Client/core/CSettings.cpp:3811 +#: Client/core/CSettings.cpp:3791 msgid "Red:" msgstr "" -#: Client/core/CSettings.cpp:3811 +#: Client/core/CSettings.cpp:3791 msgid "Green:" msgstr "" -#: Client/core/CSettings.cpp:3811 +#: Client/core/CSettings.cpp:3791 msgid "Blue:" msgstr "" -#: Client/core/CSettings.cpp:3811 +#: Client/core/CSettings.cpp:3791 msgid "Transparency:" msgstr "" -#: Client/core/CSettings.cpp:3814 +#: Client/core/CSettings.cpp:3794 msgid "Color" msgstr "" -#: Client/core/CSettings.cpp:3891 +#: Client/core/CSettings.cpp:3871 msgid "Preview" msgstr "" -#: Client/core/CSettings.cpp:4199 +#: Client/core/CSettings.cpp:4179 msgid "Please disconnect before changing language" msgstr "" -#: Client/core/CSettings.cpp:4227 +#: Client/core/CSettings.cpp:4207 msgid "Please disconnect before changing skin" msgstr "" -#: Client/core/CSettings.cpp:4515 +#: Client/core/CSettings.cpp:4495 msgid "" "Volmetric shadows can cause some systems to slow down.\n" "\n" "Are you sure you want to enable them?" msgstr "" -#: Client/core/CSettings.cpp:4519 +#: Client/core/CSettings.cpp:4499 msgid "PERFORMANCE WARNING" msgstr "" -#: Client/core/CSettings.cpp:4539 +#: Client/core/CSettings.cpp:4519 msgid "" "Screen upload is required by some servers for anti-cheat purposes.\n" "\n" "(The chat box and GUI is excluded from the upload)\n" msgstr "" -#: Client/core/CSettings.cpp:4541 +#: Client/core/CSettings.cpp:4521 msgid "SCREEN UPLOAD INFORMATION" msgstr "" -#: Client/core/CSettings.cpp:4556 +#: Client/core/CSettings.cpp:4536 msgid "" "Some scripts may play sounds, such as radio, from the internet.\n" "\n" @@ -2850,11 +2846,11 @@ msgid "" "bandwidth consumption.\n" msgstr "" -#: Client/core/CSettings.cpp:4559 +#: Client/core/CSettings.cpp:4539 msgid "EXTERNAL SOUNDS" msgstr "" -#: Client/core/CSettings.cpp:4588 +#: Client/core/CSettings.cpp:4568 msgid "" "It seems that you have the Rich Presence connection option enabled.\n" "Do you want to allow servers to share their data?\n" @@ -2862,11 +2858,11 @@ msgid "" "This includes yours unique ID identifier." msgstr "" -#: Client/core/CSettings.cpp:4593 +#: Client/core/CSettings.cpp:4573 msgid "CONSENT TO ALLOW DATA SHARING" msgstr "" -#: Client/core/CSettings.cpp:4617 +#: Client/core/CSettings.cpp:4597 msgid "" "Some files in your GTA:SA data directory are customized.\n" "MTA will only use these modified files if this check box is ticked.\n" @@ -2876,7 +2872,7 @@ msgid "" "Are you sure you want to use them?" msgstr "" -#: Client/core/CSettings.cpp:4666 +#: Client/core/CSettings.cpp:4646 msgid "" "Enabling DPI awareness is an experimental feature and\n" "we only recommend it when you play MTA:SA on a scaled monitor.\n" @@ -2885,77 +2881,77 @@ msgid "" "Are you sure you want to enable this option?" msgstr "" -#: Client/core/CSettings.cpp:4672 +#: Client/core/CSettings.cpp:4652 msgid "EXPERIMENTAL FEATURE" msgstr "" -#: Client/core/CSettings.cpp:4815 +#: Client/core/CSettings.cpp:4795 msgid "Please enter a nickname" msgstr "" -#: Client/core/CSettings.cpp:4816 +#: Client/core/CSettings.cpp:4796 msgid "" "Please enter a nickname to be used ingame. \n" "This will be your name when you connect to and play in a server" msgstr "" -#: Client/core/CSettings.cpp:4834 +#: Client/core/CSettings.cpp:4814 msgid "Very experimental feature." msgstr "" -#: Client/core/CSettings.cpp:4836 +#: Client/core/CSettings.cpp:4816 msgid "Stops stalls with CJ variations (Uses 65MB more RAM)" msgstr "" -#: Client/core/CSettings.cpp:4838 +#: Client/core/CSettings.cpp:4818 msgid "Older routers may require a slower scan speed." msgstr "" -#: Client/core/CSettings.cpp:4840 +#: Client/core/CSettings.cpp:4820 msgid "Switch on to use only one connection when downloading." msgstr "" -#: Client/core/CSettings.cpp:4842 +#: Client/core/CSettings.cpp:4822 msgid "Tag network packets to help ISPs identify MTA traffic." msgstr "" -#: Client/core/CSettings.cpp:4844 +#: Client/core/CSettings.cpp:4824 msgid "Spinning circle animation at the bottom of the screen" msgstr "" -#: Client/core/CSettings.cpp:4846 +#: Client/core/CSettings.cpp:4826 msgid "Select default always. (This setting is not saved)" msgstr "" -#: Client/core/CSettings.cpp:4848 +#: Client/core/CSettings.cpp:4828 msgid "Maximum is usually best" msgstr "" -#: Client/core/CSettings.cpp:4850 Client/core/CSettings.cpp:4852 +#: Client/core/CSettings.cpp:4830 Client/core/CSettings.cpp:4832 msgid "Auto updater:" msgstr "" -#: Client/core/CSettings.cpp:4850 +#: Client/core/CSettings.cpp:4830 msgid "Select default unless you like filling out bug reports." msgstr "" -#: Client/core/CSettings.cpp:4852 +#: Client/core/CSettings.cpp:4832 msgid "Select default to automatically install important updates." msgstr "" -#: Client/core/CSettings.cpp:4854 +#: Client/core/CSettings.cpp:4834 msgid "16-bit color:" msgstr "" -#: Client/core/CSettings.cpp:4854 +#: Client/core/CSettings.cpp:4834 msgid "Enable 16 bit color modes - Requires MTA restart" msgstr "" -#: Client/core/CSettings.cpp:4856 +#: Client/core/CSettings.cpp:4836 msgid "Mouse fix:" msgstr "" -#: Client/core/CSettings.cpp:4856 +#: Client/core/CSettings.cpp:4836 msgid "Mouse movement fix - May need PC restart" msgstr "" From a5dfc5223358127299511b618ab29da08ff23030 Mon Sep 17 00:00:00 2001 From: Prox <77501848+Proxy-99@users.noreply.github.com> Date: Wed, 23 Oct 2024 19:28:56 +0300 Subject: [PATCH 09/16] add setVehicleSmokeTrailEnabled & isVehicleSmokeTrailEnabled function (#3810) --- .../logic/luadefs/CLuaVehicleDefs.cpp | 20 +++++++++++++++++++ .../logic/luadefs/CLuaVehicleDefs.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp index 6ac42bf386..fabdf76f16 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp @@ -92,6 +92,7 @@ void CLuaVehicleDefs::LoadFunctions() {"getVehicleModelWheelSize", ArgumentParser}, {"getVehicleWheelFrictionState", ArgumentParser}, {"getVehicleEntryPoints", ArgumentParser}, + {"isVehicleSmokeTrailEnabled", ArgumentParser}, // Vehicle set funcs {"createVehicle", CreateVehicle}, @@ -156,6 +157,7 @@ void CLuaVehicleDefs::LoadFunctions() {"setVehicleWheelScale", ArgumentParser}, {"setVehicleModelWheelSize", ArgumentParser}, {"spawnVehicleFlyingComponent", ArgumentParser}, + {"setVehicleSmokeTrailEnabled", ArgumentParser}, }; // Add functions @@ -244,6 +246,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "getModelWheelSize", "getVehicleModelWheelSize"); lua_classfunction(luaVM, "getWheelFrictionState", "getVehicleWheelFrictionState"); lua_classfunction(luaVM, "getEntryPoints", ArgumentParser); + lua_classfunction(luaVM, "isSmokeTrailEnabled", "isVehicleSmokeTrailEnabled"); lua_classfunction(luaVM, "setComponentVisible", "setVehicleComponentVisible"); lua_classfunction(luaVM, "setSirensOn", "setVehicleSirensOn"); @@ -292,6 +295,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "setVariant", "setVehicleVariant"); lua_classfunction(luaVM, "setWheelScale", "setVehicleWheelScale"); lua_classfunction(luaVM, "setModelWheelSize", "setVehicleModelWheelSize"); + lua_classfunction(luaVM, "setSmokeTrailEnabled", "setVehicleSmokeTrailEnabled"); lua_classfunction(luaVM, "resetComponentPosition", "resetVehicleComponentPosition"); lua_classfunction(luaVM, "resetComponentRotation", "resetVehicleComponentRotation"); @@ -4340,3 +4344,19 @@ bool CLuaVehicleDefs::SpawnVehicleFlyingComponent(CClientVehicle* const vehicle, return vehicle->SpawnFlyingComponent(partNodeIndex, collisionType, removalTime.value_or(-1)); } + +bool CLuaVehicleDefs::SetSmokeTrailEnabled(CClientVehicle* vehicle, bool state) +{ + std::uint16_t model = vehicle->GetModel(); + if (model != 512 && model != 513) + throw LuaFunctionError("Invaild model ID"); + + vehicle->SetSmokeTrailEnabled(state); + return true; +} + +bool CLuaVehicleDefs::IsSmokeTrailEnabled(CClientVehicle* vehicle) noexcept +{ + return vehicle->IsSmokeTrailEnabled(); +} + diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h index 28c2f5e372..5e4695e850 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h @@ -181,4 +181,7 @@ class CLuaVehicleDefs : public CLuaDefs LUA_DECLARE(GetVehicleComponents); static bool SpawnVehicleFlyingComponent(CClientVehicle* const vehicle, std::uint8_t nodeIndex, std::optional componentCollisionType, std::optional removalTime); + + static bool SetSmokeTrailEnabled(CClientVehicle* vehicle, bool state); + static bool IsSmokeTrailEnabled(CClientVehicle* vehicle) noexcept; }; From 26d18288730fd3a7a854152da60c9acd18ab6c6f Mon Sep 17 00:00:00 2001 From: Prox <77501848+Proxy-99@users.noreply.github.com> Date: Wed, 23 Oct 2024 19:30:57 +0300 Subject: [PATCH 10/16] add ped dynamic shadows functions (#3809) --- Client/game_sa/CSettingsSA.cpp | 14 +++++++++++++ Client/game_sa/CSettingsSA.h | 2 ++ Client/mods/deathmatch/logic/CClientGame.cpp | 10 +++++---- .../logic/luadefs/CLuaWorldDefs.cpp | 21 ++++++++++++++++++- .../deathmatch/logic/luadefs/CLuaWorldDefs.h | 5 ++++- Client/sdk/game/CSettings.h | 2 ++ 6 files changed, 48 insertions(+), 6 deletions(-) diff --git a/Client/game_sa/CSettingsSA.cpp b/Client/game_sa/CSettingsSA.cpp index 4ce70b5eed..95b66d40df 100644 --- a/Client/game_sa/CSettingsSA.cpp +++ b/Client/game_sa/CSettingsSA.cpp @@ -316,6 +316,20 @@ void CSettingsSA::SetDynamicPedShadowsEnabled(bool bEnable) m_bDynamicPedShadowsEnabled = bEnable; } +bool CSettingsSA::IsDynamicPedShadowsEnabledByVideoSetting() const noexcept +{ + bool pedDynamicShadows; + g_pCore->GetCVars()->Get("dynamic_ped_shadows", pedDynamicShadows); + return pedDynamicShadows; +} + +bool CSettingsSA::ResetDynamicPedShadows() noexcept +{ + pGame->GetSettings()->SetDynamicPedShadowsEnabled(pGame->GetSettings()->IsDynamicPedShadowsEnabledByVideoSetting()); + return true; +} + + // // Volumetric shadow hooks // diff --git a/Client/game_sa/CSettingsSA.h b/Client/game_sa/CSettingsSA.h index 7947c94929..3986ec1059 100644 --- a/Client/game_sa/CSettingsSA.h +++ b/Client/game_sa/CSettingsSA.h @@ -147,6 +147,8 @@ class CSettingsSA : public CGameSettings bool IsDynamicPedShadowsEnabled(); void SetDynamicPedShadowsEnabled(bool bEnable); + bool IsDynamicPedShadowsEnabledByVideoSetting() const noexcept; + bool ResetDynamicPedShadows() noexcept; float GetAspectRatioValue(); eAspectRatio GetAspectRatio(); diff --git a/Client/mods/deathmatch/logic/CClientGame.cpp b/Client/mods/deathmatch/logic/CClientGame.cpp index bc20947eac..429bafb365 100644 --- a/Client/mods/deathmatch/logic/CClientGame.cpp +++ b/Client/mods/deathmatch/logic/CClientGame.cpp @@ -5456,10 +5456,6 @@ void CClientGame::ResetMapInfo() // Players m_pPlayerManager->ResetAll(); - // Reset Frozen Time - g_pGame->GetClock()->ResetTimeFrozen(); - g_pGame->GetSettings()->ResetVolumetricShadows(); - // Disable the change of any player stats g_pMultiplayer->SetLocalStatsStatic(true); @@ -6887,6 +6883,12 @@ void CClientGame::ResetWorldProperties(const ResetWorldPropsInfo& resetPropsInfo // Reset volumetric shadows g_pGame->GetSettings()->ResetVolumetricShadows(); + + // Reset Frozen Time + g_pGame->GetClock()->ResetTimeFrozen(); + + // Reset DynamicPedShadows + g_pGame->GetSettings()->ResetDynamicPedShadows(); } void CClientGame::OnWindowFocusChange(bool state) diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp index 382c2c7488..9a9e038b19 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp @@ -106,6 +106,7 @@ void CLuaWorldDefs::LoadFunctions() {"restoreWorldModel", RestoreWorldBuilding}, {"setTimeFrozen", ArgumentParser}, {"setVolumetricShadowsEnabled", ArgumentParser}, + {"setDynamicPedShadowsEnabled", ArgumentParser}, // World create funcs {"createSWATRope", CreateSWATRope}, @@ -131,6 +132,7 @@ void CLuaWorldDefs::LoadFunctions() {"resetTimeFrozen", ArgumentParser}, {"resetVolumetricShadows", ArgumentParser}, {"resetWorldProperties", ArgumentParser}, + {"resetDynamicPedShadows", ArgumentParser}, // World check funcs {"areTrafficLightsLocked", AreTrafficLightsLocked}, @@ -139,7 +141,8 @@ void CLuaWorldDefs::LoadFunctions() {"isWorldSpecialPropertyEnabled", ArgumentParserWarn}, {"isGarageOpen", IsGarageOpen}, {"isTimeFrozen", ArgumentParser}, - {"isVolumetricShadowsEnabled", ArgumentParser}}; + {"isVolumetricShadowsEnabled", ArgumentParser}, + {"isDynamicPedShadowsEnabled", ArgumentParser}}; // Add functions for (const auto& [name, func] : functions) @@ -2278,3 +2281,19 @@ void CLuaWorldDefs::ResetWorldProperties(std::optional resetSpecialWorldPr { g_pClientGame->ResetWorldProperties(ResetWorldPropsInfo{resetSpecialWorldProperties.value_or(true), resetWorldProperties.value_or(true), resetWeatherProperties.value_or(true), resetLODs.value_or(true), resetSounds.value_or(true)}); } + +bool CLuaWorldDefs::SetDynamicPedShadowsEnabled(bool enable) +{ + g_pGame->GetSettings()->SetDynamicPedShadowsEnabled(enable); + return true; +} + +bool CLuaWorldDefs::IsDynamicPedShadowsEnabled() noexcept +{ + return g_pGame->GetSettings()->IsDynamicPedShadowsEnabled(); +} + +bool CLuaWorldDefs::ResetDynamicPedShadows() noexcept +{ + return g_pGame->GetSettings()->ResetDynamicPedShadows(); +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h index ac38251dc7..f430bd63dd 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h @@ -140,6 +140,9 @@ class CLuaWorldDefs : public CLuaDefs static bool ResetVolumetricShadows() noexcept; static void ResetWorldProperties(std::optional resetSpecialWorldProperties, std::optional resetWorldProperties, std::optional resetWeatherProperties, std::optional resetLODs, std::optional resetSounds) noexcept; - + + static bool SetDynamicPedShadowsEnabled(bool enable); + static bool IsDynamicPedShadowsEnabled() noexcept; + static bool ResetDynamicPedShadows() noexcept; }; diff --git a/Client/sdk/game/CSettings.h b/Client/sdk/game/CSettings.h index d5ef10a05b..6ce85f2c2e 100644 --- a/Client/sdk/game/CSettings.h +++ b/Client/sdk/game/CSettings.h @@ -140,6 +140,8 @@ class CGameSettings virtual bool IsDynamicPedShadowsEnabled() = 0; virtual void SetDynamicPedShadowsEnabled(bool bEnable) = 0; + virtual bool IsDynamicPedShadowsEnabledByVideoSetting() const noexcept = 0; + virtual bool ResetDynamicPedShadows() noexcept = 0; virtual float GetAspectRatioValue() = 0; virtual eAspectRatio GetAspectRatio() = 0; From 353b6c60ec9719ab06c982616c6846eb85e0ab91 Mon Sep 17 00:00:00 2001 From: Pot Bot <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:33:46 +0000 Subject: [PATCH 11/16] Update client en_US pot [ci skip] --- .../MTA/locale/en_US/client.pot | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot index 5d498383f8..ec1109aa63 100644 --- a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot +++ b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MTA San Andreas 1.x\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-21 22:24+0000\n" +"POT-Creation-Date: 2024-10-23 16:33+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -433,23 +433,23 @@ msgstr "" msgid "MTA Client verification failed!" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5623 +#: Client/mods/deathmatch/logic/CClientGame.cpp:5619 msgid "In a ditch" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5623 +#: Client/mods/deathmatch/logic/CClientGame.cpp:5619 msgid "En-route to hospital" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5623 +#: Client/mods/deathmatch/logic/CClientGame.cpp:5619 msgid "Meeting their maker" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5624 +#: Client/mods/deathmatch/logic/CClientGame.cpp:5620 msgid "Regretting their decisions" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5624 +#: Client/mods/deathmatch/logic/CClientGame.cpp:5620 msgid "Wasted" msgstr "" @@ -744,16 +744,16 @@ msgstr "" msgid "Download error: %s" msgstr "" -#: Client/game_sa/CSettingsSA.cpp:767 +#: Client/game_sa/CSettingsSA.cpp:781 msgid "Can't find valid screen resolution." msgstr "" #. Confirm that res should be used -#: Client/game_sa/CSettingsSA.cpp:843 +#: Client/game_sa/CSettingsSA.cpp:857 msgid "Are you sure you want to use this screen resolution?" msgstr "" -#: Client/game_sa/CSettingsSA.cpp:845 Client/loader/Dialogs.cpp:194 +#: Client/game_sa/CSettingsSA.cpp:859 Client/loader/Dialogs.cpp:194 msgid "MTA: San Andreas" msgstr "" From e92702ca56a30b0c434cc29402b2d378ba4d7da4 Mon Sep 17 00:00:00 2001 From: Fernando Rocha <34967844+Fernando-A-Rocha@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:27:10 +0100 Subject: [PATCH 12/16] Strip server name's spaces from beginning and end (#3805) --- Server/mods/deathmatch/logic/CMainConfig.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Server/mods/deathmatch/logic/CMainConfig.cpp b/Server/mods/deathmatch/logic/CMainConfig.cpp index a535aa0ab6..d47950e73e 100644 --- a/Server/mods/deathmatch/logic/CMainConfig.cpp +++ b/Server/mods/deathmatch/logic/CMainConfig.cpp @@ -133,6 +133,9 @@ bool CMainConfig::Load() return false; } + // Strip spaces from beginning and end of server name + m_strServerName = SString(m_strServerName).TrimStart(" ").TrimEnd(" "); + // Grab the forced server ip(s) GetString(m_pRootNode, "serverip", m_strServerIP); m_strServerIP = SString(m_strServerIP).Replace(" ", ""); From 2c9f48c22db1911e77b10ea5ee04ed565c5441e0 Mon Sep 17 00:00:00 2001 From: Fernando Rocha <34967844+Fernando-A-Rocha@users.noreply.github.com> Date: Tue, 29 Oct 2024 22:47:37 +0000 Subject: [PATCH 13/16] Add `resource_client_file_checks` setting to disable corrupt PNG/TXD/DFF warnings (#3822) --- Server/mods/deathmatch/editor.conf | 4 ++++ Server/mods/deathmatch/local.conf | 4 ++++ Server/mods/deathmatch/logic/CMainConfig.cpp | 1 + Server/mods/deathmatch/logic/CMainConfig.h | 2 ++ Server/mods/deathmatch/logic/CResourceChecker.cpp | 8 +++++++- Server/mods/deathmatch/mtaserver.conf | 4 ++++ Server/mods/deathmatch/mtaserver.conf.template | 4 ++++ 7 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Server/mods/deathmatch/editor.conf b/Server/mods/deathmatch/editor.conf index f72486a6cb..3b2b75fa80 100644 --- a/Server/mods/deathmatch/editor.conf +++ b/Server/mods/deathmatch/editor.conf @@ -263,6 +263,10 @@ *NOTE* This only protects resources which use dbConnect with mysql Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + + 1 diff --git a/Server/mods/deathmatch/local.conf b/Server/mods/deathmatch/local.conf index ec3defd37d..99b97bee07 100644 --- a/Server/mods/deathmatch/local.conf +++ b/Server/mods/deathmatch/local.conf @@ -263,6 +263,10 @@ *NOTE* This only protects resources which use dbConnect with mysql Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + + 1 diff --git a/Server/mods/deathmatch/logic/CMainConfig.cpp b/Server/mods/deathmatch/logic/CMainConfig.cpp index d47950e73e..4e6b84ce3f 100644 --- a/Server/mods/deathmatch/logic/CMainConfig.cpp +++ b/Server/mods/deathmatch/logic/CMainConfig.cpp @@ -1468,6 +1468,7 @@ const std::vector& CMainConfig::GetIntSettingList() {false, false, 0, 0, 1, "fakelag", &m_bFakeLagCommandEnabled, NULL}, {true, true, 50, 1000, 5000, "player_triggered_event_interval", &m_iPlayerTriggeredEventIntervalMs, &CMainConfig::OnPlayerTriggeredEventIntervalChange}, {true, true, 1, 100, 1000, "max_player_triggered_events_per_interval", &m_iMaxPlayerTriggeredEventsPerInterval, &CMainConfig::OnPlayerTriggeredEventIntervalChange}, + {true, true, 0, 1, 1, "resource_client_file_checks", &m_checkResourceClientFiles, nullptr}, }; static std::vector settingsList; diff --git a/Server/mods/deathmatch/logic/CMainConfig.h b/Server/mods/deathmatch/logic/CMainConfig.h index b52733229a..1ddb0c8645 100644 --- a/Server/mods/deathmatch/logic/CMainConfig.h +++ b/Server/mods/deathmatch/logic/CMainConfig.h @@ -126,6 +126,7 @@ class CMainConfig : public CXMLConfig const std::vector& GetOwnerEmailAddressList() const { return m_OwnerEmailAddressList; } bool IsDatabaseCredentialsProtectionEnabled() const { return m_bDatabaseCredentialsProtectionEnabled != 0; } bool IsFakeLagCommandEnabled() const { return m_bFakeLagCommandEnabled != 0; } + bool IsCheckResourceClientFilesEnabled() const noexcept { return m_checkResourceClientFiles != 0; } SString GetSetting(const SString& configSetting); bool GetSetting(const SString& configSetting, SString& strValue); @@ -227,4 +228,5 @@ class CMainConfig : public CXMLConfig int m_bFakeLagCommandEnabled; int m_iPlayerTriggeredEventIntervalMs; int m_iMaxPlayerTriggeredEventsPerInterval; + int m_checkResourceClientFiles; }; diff --git a/Server/mods/deathmatch/logic/CResourceChecker.cpp b/Server/mods/deathmatch/logic/CResourceChecker.cpp index db2909cb1c..07f433f34f 100644 --- a/Server/mods/deathmatch/logic/CResourceChecker.cpp +++ b/Server/mods/deathmatch/logic/CResourceChecker.cpp @@ -13,6 +13,8 @@ #include "CResourceChecker.h" #include "CResourceChecker.Data.h" #include "CResource.h" +#include "CMainConfig.h" +#include "CGame.h" #include "CLogger.h" #include "CStaticFunctionDefinitions.h" #include @@ -28,6 +30,7 @@ extern CNetServer* g_pRealNetServer; extern CServerInterface* g_pServerInterface; +extern CGame* g_pGame; /////////////////////////////////////////////////////////////// // @@ -48,6 +51,9 @@ void CResourceChecker::CheckResourceForIssues(CResource* pResource, const string m_ulDeprecatedWarningCount = 0; m_upgradedFullPathList.clear(); + // Checking certain resource client files is optional + bool checkResourceClientFiles = g_pGame->GetConfig()->IsCheckResourceClientFilesEnabled(); + // Check each file in the resource std::list::iterator iterf = pResource->IterBegin(); for (; iterf != pResource->IterEnd(); iterf++) @@ -73,7 +79,7 @@ void CResourceChecker::CheckResourceForIssues(CResource* pResource, const string bScript = true; bClient = true; } - else if (type == CResourceFile::RESOURCE_FILE_TYPE_CLIENT_FILE) + else if (type == CResourceFile::RESOURCE_FILE_TYPE_CLIENT_FILE && checkResourceClientFiles) { bScript = false; bClient = true; diff --git a/Server/mods/deathmatch/mtaserver.conf b/Server/mods/deathmatch/mtaserver.conf index 19fe4a05d8..31faba9112 100644 --- a/Server/mods/deathmatch/mtaserver.conf +++ b/Server/mods/deathmatch/mtaserver.conf @@ -274,6 +274,10 @@ Max events per interval range: 1 to 1000. Default: 100 --> 1000 100 + + + 1 diff --git a/Server/mods/deathmatch/mtaserver.conf.template b/Server/mods/deathmatch/mtaserver.conf.template index faf1c71a6d..73986c0695 100644 --- a/Server/mods/deathmatch/mtaserver.conf.template +++ b/Server/mods/deathmatch/mtaserver.conf.template @@ -275,4 +275,8 @@ Max events per interval range: 1 to 1000. Default: 100 --> 1000 100 + + + 1 From 9b9120c73ec97bf1b2f24703889a62fc19326f1f Mon Sep 17 00:00:00 2001 From: FileEX Date: Tue, 5 Nov 2024 21:45:56 +0100 Subject: [PATCH 14/16] Fix for randomly bright objects after weapon change (#3838) --- .../multiplayer_sa/CMultiplayerSA_Weapons.cpp | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Client/multiplayer_sa/CMultiplayerSA_Weapons.cpp b/Client/multiplayer_sa/CMultiplayerSA_Weapons.cpp index ea0f6fab19..d7513941df 100644 --- a/Client/multiplayer_sa/CMultiplayerSA_Weapons.cpp +++ b/Client/multiplayer_sa/CMultiplayerSA_Weapons.cpp @@ -200,6 +200,33 @@ void _declspec(naked) HOOK_Fx_AddBulletImpact() } } +////////////////////////////////////////////////////////////////////////////////////////// +// +// CVisibilityPlugins::RenderWeaponPedsForPC +// +// Fix for the bright objects after weapon change sometimes +// +////////////////////////////////////////////////////////////////////////////////////////// +#define HOOKPOS_CVisibilityPlugins_RenderWeaponPedsForPC 0x733123 +#define HOOKSIZE_CVisibilityPlugins_RenderWeaponPedsForPC 5 +static constexpr DWORD CONTINUE_CVisibilityPlugins_RenderWeaponPedsForPC = 0x733128; +static void _declspec(naked) HOOK_CVisibilityPlugins_RenderWeaponPedsForPC() +{ + _asm + { + mov eax, 5DF4E0h + call eax // call CPed::ResetGunFlashAlpha + + mov eax, 5533B0h + mov ecx, ebx + + push 0 + call eax // call CPed::RemoveLighting + + jmp CONTINUE_CVisibilityPlugins_RenderWeaponPedsForPC + } +} + ////////////////////////////////////////////////////////////////////////////////////////// // // CMultiplayerSA::InitHooks_Weapons @@ -212,4 +239,5 @@ void CMultiplayerSA::InitHooks_Weapons() EZHookInstall(CWeapon_GenerateDamageEvent); EZHookInstall(CShotInfo_Update); EZHookInstall(Fx_AddBulletImpact); + EZHookInstall(CVisibilityPlugins_RenderWeaponPedsForPC); } From ad1da8709352861deab6c67af8347d2341a345b1 Mon Sep 17 00:00:00 2001 From: lopsi <40902730+Lpsd@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:01:16 +0100 Subject: [PATCH 15/16] Improve random nick generation (#3834) Co-authored-by: Uladzislau Nikalayevich --- Client/core/CNickGen.cpp | 22 +++++++++++++++------- Client/core/CNickGen.h | 5 ----- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Client/core/CNickGen.cpp b/Client/core/CNickGen.cpp index a4cb2738e2..f877588539 100644 --- a/Client/core/CNickGen.cpp +++ b/Client/core/CNickGen.cpp @@ -8,10 +8,10 @@ *****************************************************************************/ #include "StdInc.h" -#include "time.h" +#include // These words are of a maximum length of 10 characters, capitalized, and stripped of whitespace -const char* const CNickGen::m_szAdjectives[] = { +const char* const szAdjectives[] = { "Aback", "Abaft", "Abandoned", "Abashed", "Aberrant", "Abhorrent", "Abiding", "Abject", "Ablaze", "Able", "Abnormal", "Aboard", "Aboriginal", "Abortive", "Abounding", "Abrasive", "Abrupt", "Absent", "Absorbed", "Absorbing", "Abstracted", "Absurd", "Abundant", "Abusive", "Acceptable", "Accessible", "Accidental", "Accurate", "Acid", "Acidic", "Acoustic", "Acrid", "Actually", @@ -109,7 +109,7 @@ const char* const CNickGen::m_szAdjectives[] = { "Worried", "Worthless", "Wrathful", "Wretched", "Wrong", "Wry", }; -const char* const CNickGen::m_szNouns[] = { +const char* const szNouns[] = { "Aardvark", "Buffalo", "Alligator", "Ant", "Anteater", "Antelope", "Ape", "Armadillo", "Donkey", "Baboon", "Badger", "Barracuda", "Bat", "Bear", "Beaver", "Bee", "Bison", "Boar", "Bush", "Butterfly", "Camel", "Calf", "Cat", "Kitten", "Cattle", "Chamois", "Cheetah", "Chicken", "Chick", "Chimpanzee", "Infant", "Empress", "Troop", @@ -196,10 +196,18 @@ const char* const CNickGen::m_szNouns[] = { "Vampire", "Parasite", "Tramp", "Bum", "Hobo", "Hitchhiker", "Deadbeat", "Acrobat", }; +constexpr auto numAdjectives = std::size(szAdjectives); +constexpr auto numNouns = std::size(szNouns); +constexpr auto maxNum = 100; + SString CNickGen::GetRandomNickname() { - srand((unsigned int)time(NULL)); - int iAdjective = rand() % NICKGEN_NUM_ADJECTIVES; - int iNoun = rand() % NICKGEN_NUM_NOUNS; - return SString("%s%s%i", m_szAdjectives[iAdjective], m_szNouns[iNoun], rand() % 100); + std::random_device rd; + std::mt19937 gen(rd()); + + std::uniform_int_distribution adjectiveDist(0, numAdjectives - 1); + std::uniform_int_distribution nounDist(0, numNouns - 1); + std::uniform_int_distribution numDist(0, maxNum); + + return SString("%s%s%i", szAdjectives[adjectiveDist(gen)], szNouns[nounDist(gen)], numDist(gen)); } diff --git a/Client/core/CNickGen.h b/Client/core/CNickGen.h index b98254f01b..86a3699072 100644 --- a/Client/core/CNickGen.h +++ b/Client/core/CNickGen.h @@ -9,13 +9,8 @@ #pragma once -#define NICKGEN_NUM_ADJECTIVES 1048 -#define NICKGEN_NUM_NOUNS 934 - class CNickGen { public: - static const char* const m_szAdjectives[NICKGEN_NUM_ADJECTIVES]; - static const char* const m_szNouns[NICKGEN_NUM_NOUNS]; static SString GetRandomNickname(); }; From 750d09adb9fd35f4c1b7786966b7ca292e35c200 Mon Sep 17 00:00:00 2001 From: Uladzislau Nikalayevich Date: Wed, 13 Nov 2024 00:16:06 +0300 Subject: [PATCH 16/16] Add element data client trust options. (#3839) --- Server/mods/deathmatch/local.conf | 6 ++++++ Server/mods/deathmatch/logic/CCustomData.cpp | 9 ++++++++- Server/mods/deathmatch/logic/CCustomData.h | 16 ++++++++++++--- Server/mods/deathmatch/logic/CElement.cpp | 8 ++++++-- Server/mods/deathmatch/logic/CElement.h | 2 +- Server/mods/deathmatch/logic/CGame.cpp | 20 ++++++++++++++++++- Server/mods/deathmatch/logic/CMainConfig.cpp | 3 +++ Server/mods/deathmatch/logic/CMainConfig.h | 2 ++ .../logic/CStaticFunctionDefinitions.cpp | 11 +++++++--- .../logic/CStaticFunctionDefinitions.h | 3 ++- .../logic/lua/CLuaFunctionParseHelpers.cpp | 6 ++++++ .../logic/lua/CLuaFunctionParseHelpers.h | 1 + .../logic/luadefs/CLuaElementDefs.cpp | 10 +++++++++- Server/mods/deathmatch/mtaserver.conf | 6 ++++++ .../mods/deathmatch/mtaserver.conf.template | 6 ++++++ 15 files changed, 96 insertions(+), 13 deletions(-) diff --git a/Server/mods/deathmatch/local.conf b/Server/mods/deathmatch/local.conf index 99b97bee07..039e155d81 100644 --- a/Server/mods/deathmatch/local.conf +++ b/Server/mods/deathmatch/local.conf @@ -268,6 +268,12 @@ Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + 0 + diff --git a/Server/mods/deathmatch/logic/CCustomData.cpp b/Server/mods/deathmatch/logic/CCustomData.cpp index f18bbd37d1..545df5a0c3 100644 --- a/Server/mods/deathmatch/logic/CCustomData.cpp +++ b/Server/mods/deathmatch/logic/CCustomData.cpp @@ -21,7 +21,7 @@ void CCustomData::Copy(CCustomData* pCustomData) } } -SCustomData* CCustomData::Get(const char* szName) +SCustomData* CCustomData::Get(const char* szName) const { assert(szName); @@ -100,6 +100,7 @@ void CCustomData::Set(const char* szName, const CLuaArgument& Variable, ESyncTyp SCustomData newData; newData.Variable = Variable; newData.syncType = syncType; + newData.clientChangesMode = eCustomDataClientTrust::UNSET; m_Data[szName] = newData; UpdateSynced(szName, Variable, syncType); } @@ -120,6 +121,12 @@ bool CCustomData::Delete(const char* szName) return false; } +void CCustomData::SetClientChangesMode(const char* szName, eCustomDataClientTrust mode) +{ + SCustomData& pData = m_Data[szName]; + pData.clientChangesMode = mode; +} + CXMLNode* CCustomData::OutputToXML(CXMLNode* pNode) { std::map::const_iterator iter = m_Data.begin(); diff --git a/Server/mods/deathmatch/logic/CCustomData.h b/Server/mods/deathmatch/logic/CCustomData.h index bfb17ff529..887ef34dee 100644 --- a/Server/mods/deathmatch/logic/CCustomData.h +++ b/Server/mods/deathmatch/logic/CCustomData.h @@ -25,10 +25,18 @@ enum class ESyncType SUBSCRIBE, }; +enum class eCustomDataClientTrust : std::uint8_t +{ + UNSET, + ALLOW, + DENY, +}; + struct SCustomData { - CLuaArgument Variable; - ESyncType syncType; + CLuaArgument Variable; + ESyncType syncType; + eCustomDataClientTrust clientChangesMode; }; class CCustomData @@ -36,12 +44,14 @@ class CCustomData public: void Copy(CCustomData* pCustomData); - SCustomData* Get(const char* szName); + SCustomData* Get(const char* szName) const; SCustomData* GetSynced(const char* szName); void Set(const char* szName, const CLuaArgument& Variable, ESyncType syncType = ESyncType::BROADCAST); bool Delete(const char* szName); + void SetClientChangesMode(const char* szName, eCustomDataClientTrust mode); + unsigned short CountOnlySynchronized(); CXMLNode* OutputToXML(CXMLNode* pNode); diff --git a/Server/mods/deathmatch/logic/CElement.cpp b/Server/mods/deathmatch/logic/CElement.cpp index 59086a2f14..79a051b545 100644 --- a/Server/mods/deathmatch/logic/CElement.cpp +++ b/Server/mods/deathmatch/logic/CElement.cpp @@ -508,7 +508,7 @@ void CElement::ReadCustomData(CEvents* pEvents, CXMLNode& Node) } } -CLuaArgument* CElement::GetCustomData(const char* szName, bool bInheritData, ESyncType* pSyncType) +CLuaArgument* CElement::GetCustomData(const char* szName, bool bInheritData, ESyncType* pSyncType, eCustomDataClientTrust* clientChangesMode) { assert(szName); @@ -518,13 +518,17 @@ CLuaArgument* CElement::GetCustomData(const char* szName, bool bInheritData, ESy { if (pSyncType) *pSyncType = pData->syncType; + + if (clientChangesMode) + *clientChangesMode = pData->clientChangesMode; + return &pData->Variable; } // If none, try returning parent's custom data if (bInheritData && m_pParent) { - return m_pParent->GetCustomData(szName, true, pSyncType); + return m_pParent->GetCustomData(szName, true, pSyncType, clientChangesMode); } // None available diff --git a/Server/mods/deathmatch/logic/CElement.h b/Server/mods/deathmatch/logic/CElement.h index e3a0fa4d07..802981cd5a 100644 --- a/Server/mods/deathmatch/logic/CElement.h +++ b/Server/mods/deathmatch/logic/CElement.h @@ -136,7 +136,7 @@ class CElement void ReadCustomData(CEvents* pEvents, CXMLNode& Node); CCustomData& GetCustomDataManager() { return m_CustomData; } - CLuaArgument* GetCustomData(const char* szName, bool bInheritData, ESyncType* pSyncType = NULL); + CLuaArgument* GetCustomData(const char* szName, bool bInheritData, ESyncType* pSyncType = nullptr, eCustomDataClientTrust* clientChangesMode = nullptr); CLuaArguments* GetAllCustomData(CLuaArguments* table); bool GetCustomDataString(const char* szName, char* pOut, size_t sizeBuffer, bool bInheritData); bool GetCustomDataInt(const char* szName, int& iOut, bool bInheritData); diff --git a/Server/mods/deathmatch/logic/CGame.cpp b/Server/mods/deathmatch/logic/CGame.cpp index d4efea393f..9543e1e447 100644 --- a/Server/mods/deathmatch/logic/CGame.cpp +++ b/Server/mods/deathmatch/logic/CGame.cpp @@ -1607,6 +1607,7 @@ void CGame::AddBuiltInEvents() m_Events.AddEvent("onPlayerTriggerEventThreshold", "", nullptr, false); m_Events.AddEvent("onPlayerTeamChange", "oldTeam, newTeam", nullptr, false); m_Events.AddEvent("onPlayerTriggerInvalidEvent", "eventName, isAdded, isRemote", nullptr, false); + m_Events.AddEvent("onPlayerChangesProtectedData", "element, key, value", nullptr, false); // Ped events m_Events.AddEvent("onPedVehicleEnter", "vehicle, seat, jacked", NULL, false); @@ -2652,7 +2653,24 @@ void CGame::Packet_CustomData(CCustomDataPacket& Packet) } ESyncType lastSyncType = ESyncType::BROADCAST; - pElement->GetCustomData(szName, false, &lastSyncType); + eCustomDataClientTrust clientChangesMode{}; + + pElement->GetCustomData(szName, false, &lastSyncType, &clientChangesMode); + + const bool changesAllowed = clientChangesMode == eCustomDataClientTrust::UNSET ? !m_pMainConfig->IsElementDataWhitelisted() + : clientChangesMode == eCustomDataClientTrust::ALLOW; + if (!changesAllowed) + { + CLogger::ErrorPrintf("Client trying to change protected element data %s (%s)", Packet.GetSourcePlayer()->GetNick(), + szName); + + CLuaArguments arguments; + arguments.PushElement(pElement); + arguments.PushString(szName); + arguments.PushArgument(Value); + pSourcePlayer->CallEvent("onPlayerChangesProtectedData", arguments); + return; + } if (lastSyncType != ESyncType::LOCAL) { diff --git a/Server/mods/deathmatch/logic/CMainConfig.cpp b/Server/mods/deathmatch/logic/CMainConfig.cpp index 4e6b84ce3f..bece65e885 100644 --- a/Server/mods/deathmatch/logic/CMainConfig.cpp +++ b/Server/mods/deathmatch/logic/CMainConfig.cpp @@ -79,6 +79,7 @@ CMainConfig::CMainConfig(CConsole* pConsole) : CXMLConfig(NULL) m_iBackupInterval = 3; m_iBackupAmount = 5; m_bSyncMapElementData = true; + m_elementDataWhitelisted = false; } bool CMainConfig::Load() @@ -526,6 +527,8 @@ bool CMainConfig::Load() g_TickRateSettings.iLightSync = Clamp(200, g_TickRateSettings.iLightSync, 4000); } + GetBoolean(m_pRootNode, "elementdata_whitelisted", m_elementDataWhitelisted); + ApplyNetOptions(); return true; diff --git a/Server/mods/deathmatch/logic/CMainConfig.h b/Server/mods/deathmatch/logic/CMainConfig.h index 1ddb0c8645..9758ae2dbf 100644 --- a/Server/mods/deathmatch/logic/CMainConfig.h +++ b/Server/mods/deathmatch/logic/CMainConfig.h @@ -126,6 +126,7 @@ class CMainConfig : public CXMLConfig const std::vector& GetOwnerEmailAddressList() const { return m_OwnerEmailAddressList; } bool IsDatabaseCredentialsProtectionEnabled() const { return m_bDatabaseCredentialsProtectionEnabled != 0; } bool IsFakeLagCommandEnabled() const { return m_bFakeLagCommandEnabled != 0; } + bool IsElementDataWhitelisted() const { return m_elementDataWhitelisted; } bool IsCheckResourceClientFilesEnabled() const noexcept { return m_checkResourceClientFiles != 0; } SString GetSetting(const SString& configSetting); @@ -228,5 +229,6 @@ class CMainConfig : public CXMLConfig int m_bFakeLagCommandEnabled; int m_iPlayerTriggeredEventIntervalMs; int m_iMaxPlayerTriggeredEventsPerInterval; + bool m_elementDataWhitelisted; int m_checkResourceClientFiles; }; diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index 67764f8057..b4d1de641f 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -954,14 +954,19 @@ bool CStaticFunctionDefinitions::SetElementID(CElement* pElement, const char* sz return true; } -bool CStaticFunctionDefinitions::SetElementData(CElement* pElement, const char* szName, const CLuaArgument& Variable, ESyncType syncType) +bool CStaticFunctionDefinitions::SetElementData(CElement* pElement, const char* szName, const CLuaArgument& Variable, ESyncType syncType, + std::optional clientTrust) { assert(pElement); assert(szName); assert(strlen(szName) <= MAX_CUSTOMDATA_NAME_LENGTH); - ESyncType lastSyncType = ESyncType::BROADCAST; - CLuaArgument* pCurrentVariable = pElement->GetCustomData(szName, false, &lastSyncType); + ESyncType lastSyncType = ESyncType::BROADCAST; + eCustomDataClientTrust lastClientTrust{}; + CLuaArgument* pCurrentVariable = pElement->GetCustomData(szName, false, &lastSyncType, &lastClientTrust); + + if (clientTrust.has_value() && lastClientTrust != clientTrust.value()) + pElement->GetCustomDataManager().SetClientChangesMode(szName, clientTrust.value()); if (!pCurrentVariable || *pCurrentVariable != Variable || lastSyncType != syncType) { diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h index dd6202208f..8c947d6f34 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h @@ -83,7 +83,8 @@ class CStaticFunctionDefinitions // Element set funcs static bool ClearElementVisibleTo(CElement* pElement); static bool SetElementID(CElement* pElement, const char* szID); - static bool SetElementData(CElement* pElement, const char* szName, const CLuaArgument& Variable, ESyncType syncType); + static bool SetElementData(CElement* pElement, const char* szName, const CLuaArgument& Variable, ESyncType syncType, + std::optional clientTrust); static bool RemoveElementData(CElement* pElement, const char* szName); static bool AddElementDataSubscriber(CElement* pElement, const char* szName, CPlayer* pPlayer); static bool RemoveElementDataSubscriber(CElement* pElement, const char* szName, CPlayer* pPlayer); diff --git a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp index ef25750c05..76540327af 100644 --- a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp +++ b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.cpp @@ -285,6 +285,12 @@ ADD_ENUM(ESyncType::LOCAL, "local") ADD_ENUM(ESyncType::SUBSCRIBE, "subscribe") IMPLEMENT_ENUM_CLASS_END("sync-mode") +IMPLEMENT_ENUM_CLASS_BEGIN(eCustomDataClientTrust) +ADD_ENUM(eCustomDataClientTrust::UNSET, "default") +ADD_ENUM(eCustomDataClientTrust::ALLOW, "allow") +ADD_ENUM(eCustomDataClientTrust::DENY, "deny") +IMPLEMENT_ENUM_CLASS_END("client-trust-mode") + // // CResource from userdata // diff --git a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h index 52a4536012..796ca3c702 100644 --- a/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h +++ b/Server/mods/deathmatch/logic/lua/CLuaFunctionParseHelpers.h @@ -38,6 +38,7 @@ DECLARE_ENUM(CAccessControlListRight::ERightType); DECLARE_ENUM(CElement::EElementType); DECLARE_ENUM(CAccountPassword::EAccountPasswordType); DECLARE_ENUM_CLASS(ESyncType); +DECLARE_ENUM_CLASS(eCustomDataClientTrust) enum eHudComponent { diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp b/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp index 6cacbdcc98..f8effd7b89 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp +++ b/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp @@ -1538,6 +1538,7 @@ int CLuaElementDefs::setElementData(lua_State* luaVM) SString strKey; CLuaArgument value; ESyncType syncType = ESyncType::BROADCAST; + std::optional clientTrust{}; CScriptArgReader argStream(luaVM); argStream.ReadUserData(pElement); @@ -1554,6 +1555,13 @@ int CLuaElementDefs::setElementData(lua_State* luaVM) else argStream.ReadEnumString(syncType, ESyncType::BROADCAST); + if (!argStream.NextIsNone()) + { + eCustomDataClientTrust trustReaded; + argStream.ReadEnumString(trustReaded); + clientTrust = trustReaded; + } + if (!argStream.HasErrors()) { LogWarningIfPlayerHasNotJoinedYet(luaVM, pElement); @@ -1566,7 +1574,7 @@ int CLuaElementDefs::setElementData(lua_State* luaVM) strKey = strKey.Left(MAX_CUSTOMDATA_NAME_LENGTH); } - if (CStaticFunctionDefinitions::SetElementData(pElement, strKey, value, syncType)) + if (CStaticFunctionDefinitions::SetElementData(pElement, strKey, value, syncType, clientTrust)) { lua_pushboolean(luaVM, true); return 1; diff --git a/Server/mods/deathmatch/mtaserver.conf b/Server/mods/deathmatch/mtaserver.conf index 31faba9112..11ef497fa7 100644 --- a/Server/mods/deathmatch/mtaserver.conf +++ b/Server/mods/deathmatch/mtaserver.conf @@ -268,6 +268,12 @@ Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + 0 + 1 + + 0 +