diff --git a/Client/cefweb/CWebApp.cpp b/Client/cefweb/CWebApp.cpp index a6fe5397e5..dde8e11863 100644 --- a/Client/cefweb/CWebApp.cpp +++ b/Client/cefweb/CWebApp.cpp @@ -21,6 +21,13 @@ 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()) + command_line->AppendSwitch("disable-gpu"); + + 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 fe02e029a3..bd26c68711 100644 --- a/Client/cefweb/CWebCore.cpp +++ b/Client/cefweb/CWebCore.cpp @@ -49,10 +49,13 @@ CWebCore::~CWebCore() delete m_pXmlConfig; } -bool CWebCore::Initialise() +bool CWebCore::Initialise(bool gpuEnabled) { CefMainArgs mainArgs; void* sandboxInfo = nullptr; + + m_bGPUEnabled = gpuEnabled; + CefRefPtr app(new CWebApp); #ifdef CEF_ENABLE_SANDBOX @@ -869,3 +872,8 @@ void CWebCore::StaticFetchBlacklistFinished(const SHttpDownloadResult& result) OutputDebugLine("Updated browser blacklist!"); #endif } + +bool CWebCore::GetGPUEnabled() const noexcept +{ + return m_bGPUEnabled; +} diff --git a/Client/cefweb/CWebCore.h b/Client/cefweb/CWebCore.h index 4db4a9036c..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() override; + bool Initialise(bool gpuEnabled) override; CWebViewInterface* CreateWebView(unsigned int uiWidth, unsigned int uiHeight, bool bIsLocal, CWebBrowserItem* pWebBrowserRenderItem, bool bTransparent); void DestroyWebView(CWebViewInterface* pWebViewInterface); @@ -108,6 +108,8 @@ class CWebCore : public CWebCoreInterface static void StaticFetchWhitelistFinished(const SHttpDownloadResult& result); static void StaticFetchBlacklistFinished(const SHttpDownloadResult& result); + bool GetGPUEnabled() const noexcept; + private: typedef std::pair WebFilterPair; @@ -129,4 +131,7 @@ class CWebCore : public CWebCoreInterface CXMLFile* m_pXmlConfig; int m_iWhitelistRevision; int m_iBlacklistRevision; + + // Shouldn't be changed after init + bool m_bGPUEnabled; }; diff --git a/Client/core/CClientVariables.cpp b/Client/core/CClientVariables.cpp index fb9bd3b245..8019c2687b 100644 --- a/Client/core/CClientVariables.cpp +++ b/Client/core/CClientVariables.cpp @@ -358,6 +358,7 @@ 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) if (!Exists("locale")) { diff --git a/Client/core/CCore.cpp b/Client/core/CCore.cpp index b9a2391f46..12e8cf81d5 100644 --- a/Client/core/CCore.cpp +++ b/Client/core/CCore.cpp @@ -1155,8 +1155,12 @@ CWebCoreInterface* CCore::GetWebCore() { if (m_pWebCore == nullptr) { + bool gpuEnabled; + auto cvars = g_pCore->GetCVars(); + cvars->Get("browser_enable_gpu", gpuEnabled); + m_pWebCore = CreateModule(m_WebCoreModule, "CefWeb", "cefweb", "InitWebCoreInterface", this); - m_pWebCore->Initialise(); + m_pWebCore->Initialise(gpuEnabled); } return m_pWebCore; } 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); } } 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(); }; diff --git a/Client/core/CSettings.cpp b/Client/core/CSettings.cpp index 847735a891..1cfe5c90eb 100644 --- a/Client/core/CSettings.cpp +++ b/Client/core/CSettings.cpp @@ -917,6 +917,10 @@ 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 - 25.0f)); + m_pCheckBoxBrowserGPUEnabled->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 +3291,8 @@ 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); ReloadBrowserLists(); } @@ -3711,6 +3717,13 @@ 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); + // Ensure CVARS ranges ok CClientVariables::GetSingleton().ValidateValues(); @@ -3720,7 +3733,7 @@ void CSettings::SaveData() gameSettings->Save(); // Ask to restart? - if (bIsVideoModeChanged || bIsAntiAliasingChanged || bIsCustomizedSAFilesChanged || processsDPIAwareChanged) + if (bIsVideoModeChanged || bIsAntiAliasingChanged || bIsCustomizedSAFilesChanged || processsDPIAwareChanged || bBrowserGPUSettingChanged) ShowRestartQuestion(); else if (CModManager::GetSingleton().IsLoaded() && bBrowserSettingChanged) ShowDisconnectQuestion(); diff --git a/Client/core/CSettings.h b/Client/core/CSettings.h index bfeec87c44..db6c077df4 100644 --- a/Client/core/CSettings.h +++ b/Client/core/CSettings.h @@ -338,6 +338,7 @@ class CSettings CGUIButton* m_pButtonBrowserWhitelistAdd; CGUIGridList* m_pGridBrowserWhitelist; CGUIButton* m_pButtonBrowserWhitelistRemove; + CGUICheckBox* m_pCheckBoxBrowserGPUEnabled; bool m_bBrowserListsChanged; bool m_bBrowserListsLoadEnabled; 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/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; } } 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/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/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; }; 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/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); } diff --git a/Client/sdk/core/CWebCoreInterface.h b/Client/sdk/core/CWebCoreInterface.h index e1e2f7651d..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() = 0; + virtual bool Initialise(bool gpuEnabled) = 0; virtual CWebViewInterface* CreateWebView(unsigned int uiWidth, unsigned int uiHeight, bool bIsLocal, CWebBrowserItem* pWebBrowserRenderItem, bool bTransparent) = 0; @@ -90,4 +90,6 @@ 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; }; 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; 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..039e155d81 100644 --- a/Server/mods/deathmatch/local.conf +++ b/Server/mods/deathmatch/local.conf @@ -263,6 +263,16 @@ *NOTE* This only protects resources which use dbConnect with mysql Values: 0 - Off, 1 - Enabled. Default - 1 --> 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 58989394ec..9543e1e447 100644 --- a/Server/mods/deathmatch/logic/CGame.cpp +++ b/Server/mods/deathmatch/logic/CGame.cpp @@ -71,6 +71,7 @@ #include "version.h" #include "net/SimHeaders.h" #include +#include #define MAX_BULLETSYNC_DISTANCE 400.0f #define MAX_EXPLOSION_SYNC_DISTANCE 400.0f @@ -1606,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); @@ -1783,7 +1785,21 @@ void CGame::Packet_PlayerJoinData(CPlayerJoinDataPacket& Packet) SString strIP = pPlayer->GetSourceIP(); SString strIPAndSerial("IP: %s Serial: %s Version: %s", strIP.c_str(), strSerial.c_str(), strPlayerVersion.c_str()); - if (!CheckNickProvided(szNick)) // check the nick is valid + + // Prevent player from connecting if serial is invalid + const std::regex serialRegex("^[A-F0-9]{32}$"); + if (!std::regex_match(strSerial, serialRegex)) + { + // Tell the console + CLogger::LogPrintf("CONNECT: %s failed to connect (Invalid serial) (%s)\n", szNick, strIPAndSerial.c_str()); + + // Tell the player the problem + DisconnectPlayer(this, *pPlayer, CPlayerDisconnectedPacket::SERIAL_VERIFICATION); + return; + } + + // Check the nick is valid + if (!CheckNickProvided(szNick)) { // Tell the console CLogger::LogPrintf("CONNECT: %s failed to connect (Invalid nickname) (%s)\n", szNick, strIPAndSerial.c_str()); @@ -2637,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 a535aa0ab6..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() @@ -133,6 +134,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(" ", ""); @@ -523,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; @@ -1465,6 +1471,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..9758ae2dbf 100644 --- a/Server/mods/deathmatch/logic/CMainConfig.h +++ b/Server/mods/deathmatch/logic/CMainConfig.h @@ -126,6 +126,8 @@ 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); bool GetSetting(const SString& configSetting, SString& strValue); @@ -227,4 +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/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/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 19fe4a05d8..11ef497fa7 100644 --- a/Server/mods/deathmatch/mtaserver.conf +++ b/Server/mods/deathmatch/mtaserver.conf @@ -268,12 +268,22 @@ Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + 0 + 1000 100 + + + 1 diff --git a/Server/mods/deathmatch/mtaserver.conf.template b/Server/mods/deathmatch/mtaserver.conf.template index faf1c71a6d..88288cc9d6 100644 --- a/Server/mods/deathmatch/mtaserver.conf.template +++ b/Server/mods/deathmatch/mtaserver.conf.template @@ -269,10 +269,20 @@ Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + 0 + 1000 100 + + + 1 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..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-10 20:57+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" @@ -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: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:3483 +#: 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:3479 +#: 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:87 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: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 @@ -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 "" @@ -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: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:4784 +#: Client/core/CSettings.cpp:4797 msgid "Cancel" 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 "" @@ -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: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: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: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: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: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:1004 +#: Client/core/CSettings.cpp:1008 msgid "Fullscreen mode:" msgstr "" #: Client/loader/MainFunctions.cpp:389 Client/core/CSettings.cpp:670 -#: Client/core/CSettings.cpp:1615 +#: 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:4590 +#: 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:2240 -#: Client/core/CSettings.cpp:2268 +#: 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:2242 -#: Client/core/CSettings.cpp:2269 +#: Client/core/CKeyBinds.cpp:192 Client/core/CSettings.cpp:2246 +#: Client/core/CSettings.cpp:2273 msgid "Right" msgstr "" @@ -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." @@ -1895,102 +1895,102 @@ msgstr "" msgid "%s module is incorrect!" msgstr "" -#: Client/core/CCore.cpp:1275 +#: Client/core/CCore.cpp:1279 msgid "Error executing URL" msgstr "" -#: Client/core/CCore.cpp:1287 +#: 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:1389 +#: Client/core/CCore.cpp:1393 msgid "this help screen" msgstr "" -#: Client/core/CCore.cpp:1390 Client/core/CCore.cpp:1391 +#: Client/core/CCore.cpp:1394 Client/core/CCore.cpp:1395 msgid "exits the application" msgstr "" -#: Client/core/CCore.cpp:1392 +#: Client/core/CCore.cpp:1396 msgid "shows the version" msgstr "" -#: Client/core/CCore.cpp:1393 +#: Client/core/CCore.cpp:1397 msgid "shows the time" msgstr "" -#: Client/core/CCore.cpp:1394 +#: Client/core/CCore.cpp:1398 msgid "shows the hud" msgstr "" -#: Client/core/CCore.cpp:1395 +#: Client/core/CCore.cpp:1399 msgid "shows all the binds" msgstr "" -#: Client/core/CCore.cpp:1396 +#: Client/core/CCore.cpp:1400 msgid "shows your serial" msgstr "" -#: Client/core/CCore.cpp:1405 +#: Client/core/CCore.cpp:1409 msgid "connects to a server (host port nick pass)" msgstr "" -#: Client/core/CCore.cpp:1406 +#: Client/core/CCore.cpp:1410 msgid "connects to a previous server" msgstr "" -#: Client/core/CCore.cpp:1407 +#: Client/core/CCore.cpp:1411 msgid "binds a key (key control)" msgstr "" -#: Client/core/CCore.cpp:1408 +#: Client/core/CCore.cpp:1412 msgid "unbinds a key (key)" msgstr "" -#: Client/core/CCore.cpp:1409 +#: Client/core/CCore.cpp:1413 msgid "copies the default gta controls" msgstr "" -#: Client/core/CCore.cpp:1410 +#: Client/core/CCore.cpp:1414 msgid "outputs a screenshot" msgstr "" -#: Client/core/CCore.cpp:1411 +#: Client/core/CCore.cpp:1415 msgid "immediately saves the config" msgstr "" -#: Client/core/CCore.cpp:1413 +#: Client/core/CCore.cpp:1417 msgid "clears the debug view" msgstr "" -#: Client/core/CCore.cpp:1414 +#: Client/core/CCore.cpp:1418 msgid "scrolls the chatbox upwards" msgstr "" -#: Client/core/CCore.cpp:1415 +#: Client/core/CCore.cpp:1419 msgid "scrolls the chatbox downwards" msgstr "" -#: Client/core/CCore.cpp:1416 +#: Client/core/CCore.cpp:1420 msgid "scrolls the debug view upwards" msgstr "" -#: Client/core/CCore.cpp:1417 +#: Client/core/CCore.cpp:1421 msgid "scrolls the debug view downwards" msgstr "" -#: Client/core/CCore.cpp:1420 +#: Client/core/CCore.cpp:1424 msgid "shows the memory statistics" msgstr "" -#: Client/core/CCore.cpp:1421 +#: Client/core/CCore.cpp:1425 msgid "shows the frame timing graph" msgstr "" -#: Client/core/CCore.cpp:1425 +#: 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:3087 +#: Client/core/CSettings.cpp:573 Client/core/CSettings.cpp:3091 msgid "Radio" msgstr "" -#: Client/core/CSettings.cpp:574 Client/core/CSettings.cpp:3089 +#: Client/core/CSettings.cpp:574 Client/core/CSettings.cpp:3093 msgid "Random" msgstr "" -#: Client/core/CSettings.cpp:575 Client/core/CSettings.cpp:3091 +#: 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:1613 +#: Client/core/CSettings.cpp:669 Client/core/CSettings.cpp:1617 msgid "Standard" msgstr "" -#: Client/core/CSettings.cpp:671 Client/core/CSettings.cpp:1617 +#: 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:1517 +#: Client/core/CSettings.cpp:743 Client/core/CSettings.cpp:1521 msgid "Low" msgstr "" -#: Client/core/CSettings.cpp:744 Client/core/CSettings.cpp:1519 +#: Client/core/CSettings.cpp:744 Client/core/CSettings.cpp:1523 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:1090 +#: Client/core/CSettings.cpp:1525 Client/core/CSettings.cpp:3149 msgid "High" msgstr "" -#: Client/core/CSettings.cpp:746 Client/core/CSettings.cpp:1523 +#: 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: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: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:1529 +#: Client/core/CSettings.cpp:785 Client/core/CSettings.cpp:1533 msgid "1x" msgstr "" -#: Client/core/CSettings.cpp:786 Client/core/CSettings.cpp:1531 +#: Client/core/CSettings.cpp:786 Client/core/CSettings.cpp:1535 msgid "2x" msgstr "" -#: Client/core/CSettings.cpp:787 Client/core/CSettings.cpp:1533 +#: Client/core/CSettings.cpp:787 Client/core/CSettings.cpp:1537 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:1023 +#: Client/core/CSettings.cpp:1543 Client/core/CSettings.cpp:3158 msgid "Auto" msgstr "" -#: Client/core/CSettings.cpp:801 Client/core/CSettings.cpp:1541 +#: Client/core/CSettings.cpp:801 Client/core/CSettings.cpp:1545 msgid "4:3" msgstr "" -#: Client/core/CSettings.cpp:802 Client/core/CSettings.cpp:1543 +#: Client/core/CSettings.cpp:802 Client/core/CSettings.cpp:1547 msgid "16:10" msgstr "" -#: Client/core/CSettings.cpp:803 Client/core/CSettings.cpp:1545 +#: Client/core/CSettings.cpp:803 Client/core/CSettings.cpp:1549 msgid "16:9" msgstr "" @@ -2406,349 +2406,353 @@ msgid "Enable Javascript on remote websites" msgstr "" #: Client/core/CSettings.cpp:920 +msgid "Enable GPU rendering" +msgstr "" + +#: Client/core/CSettings.cpp:924 msgid "Custom blacklist" msgstr "" -#: Client/core/CSettings.cpp:931 Client/core/CSettings.cpp:966 +#: Client/core/CSettings.cpp:935 Client/core/CSettings.cpp:970 msgid "Enter a domain e.g. google.com" msgstr "" -#: Client/core/CSettings.cpp:939 +#: Client/core/CSettings.cpp:943 msgid "Block" msgstr "" -#: Client/core/CSettings.cpp:947 Client/core/CSettings.cpp:982 +#: Client/core/CSettings.cpp:951 Client/core/CSettings.cpp:986 msgid "Domain" msgstr "" -#: Client/core/CSettings.cpp:949 Client/core/CSettings.cpp:984 +#: Client/core/CSettings.cpp:953 Client/core/CSettings.cpp:988 msgid "Remove domain" msgstr "" #. Reset vecTemp -#: Client/core/CSettings.cpp:955 +#: Client/core/CSettings.cpp:959 msgid "Custom whitelist" msgstr "" #. Misc section label -#: Client/core/CSettings.cpp:997 +#: Client/core/CSettings.cpp:1001 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:1007 Client/core/CSettings.cpp:1014 +#: Client/core/CSettings.cpp:4816 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:1007 Client/core/CSettings.cpp:1028 +#: Client/core/CSettings.cpp:4818 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:1007 Client/core/CSettings.cpp:1042 +#: Client/core/CSettings.cpp:4820 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:1007 Client/core/CSettings.cpp:1055 +#: Client/core/CSettings.cpp:4822 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:1008 Client/core/CSettings.cpp:1068 +#: Client/core/CSettings.cpp:4824 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:1008 Client/core/CSettings.cpp:1081 +#: Client/core/CSettings.cpp:4814 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:1008 Client/core/CSettings.cpp:1095 +#: Client/core/CSettings.cpp:4826 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:1009 Client/core/CSettings.cpp:1118 +#: Client/core/CSettings.cpp:4828 msgid "Streaming memory:" msgstr "" #. Update build type -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1215 +#: Client/core/CSettings.cpp:1009 Client/core/CSettings.cpp:1219 msgid "Update build type:" msgstr "" #. UpdateAutoInstall -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1194 +#: Client/core/CSettings.cpp:1009 Client/core/CSettings.cpp:1198 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: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:1031 Client/core/CSettings.cpp:3161 +#: Client/core/CSettings.cpp:1035 Client/core/CSettings.cpp:3165 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: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:1033 Client/core/CSettings.cpp:3165 +#: Client/core/CSettings.cpp:1037 Client/core/CSettings.cpp:3169 msgid "Fast" msgstr "" -#: Client/core/CSettings.cpp:1084 Client/core/CSettings.cpp:3141 +#: Client/core/CSettings.cpp:1088 Client/core/CSettings.cpp:3145 msgid "Normal" msgstr "" -#: Client/core/CSettings.cpp:1085 Client/core/CSettings.cpp:3143 +#: Client/core/CSettings.cpp:1089 Client/core/CSettings.cpp:3147 msgid "Above normal" msgstr "" -#: Client/core/CSettings.cpp:1121 +#: Client/core/CSettings.cpp:1125 msgid "Min" msgstr "" -#: Client/core/CSettings.cpp:1134 +#: Client/core/CSettings.cpp:1138 msgid "Max" msgstr "" #. Windows 8 compatibility -#: Client/core/CSettings.cpp:1141 +#: Client/core/CSettings.cpp:1145 msgid "Windows 8 compatibility:" msgstr "" -#: Client/core/CSettings.cpp:1145 +#: Client/core/CSettings.cpp:1149 msgid "16-bit color" msgstr "" -#: Client/core/CSettings.cpp:1150 +#: Client/core/CSettings.cpp:1154 msgid "Mouse fix" msgstr "" #. Cache path info -#: Client/core/CSettings.cpp:1168 +#: Client/core/CSettings.cpp:1172 msgid "Client resource files:" msgstr "" -#: Client/core/CSettings.cpp:1172 +#: Client/core/CSettings.cpp:1176 msgid "Show in Explorer" msgstr "" #. Auto updater section label -#: Client/core/CSettings.cpp:1187 Client/core/CSettings.cpp:1190 +#: Client/core/CSettings.cpp:1191 Client/core/CSettings.cpp:1194 msgid "Auto updater" msgstr "" #. Check for updates -#: Client/core/CSettings.cpp:1228 +#: Client/core/CSettings.cpp:1232 msgid "Check for update now" msgstr "" -#: Client/core/CSettings.cpp:1382 +#: Client/core/CSettings.cpp:1386 msgid "Some settings will be changed when you next start MTA" msgstr "" -#: Client/core/CSettings.cpp:1383 +#: Client/core/CSettings.cpp:1387 msgid "" "\n" "\n" "Do you want to restart now?" msgstr "" -#: Client/core/CSettings.cpp:1386 +#: Client/core/CSettings.cpp:1390 msgid "RESTART REQUIRED" msgstr "" -#: Client/core/CSettings.cpp:1406 +#: Client/core/CSettings.cpp:1410 msgid "Some settings will be changed when you disconnect the current server" msgstr "" -#: Client/core/CSettings.cpp:1407 +#: Client/core/CSettings.cpp:1411 msgid "" "\n" "\n" "Do you want to disconnect now?" msgstr "" -#: Client/core/CSettings.cpp:1410 +#: Client/core/CSettings.cpp:1414 msgid "DISCONNECT REQUIRED" msgstr "" #. Update the joystick name -#: Client/core/CSettings.cpp:1737 +#: Client/core/CSettings.cpp:1741 msgid "Joypad not detected - Check connections and restart game" msgstr "" -#: Client/core/CSettings.cpp:1932 +#: Client/core/CSettings.cpp:1936 msgid "Binding axis" msgstr "" -#: Client/core/CSettings.cpp:1932 +#: Client/core/CSettings.cpp:1936 msgid "Move an axis to bind, or escape to clear" msgstr "" -#: Client/core/CSettings.cpp:2009 +#: Client/core/CSettings.cpp:2013 msgid "Language:" msgstr "" -#: Client/core/CSettings.cpp:2009 +#: Client/core/CSettings.cpp:2013 msgid "Skin:" msgstr "" -#: Client/core/CSettings.cpp:2009 +#: Client/core/CSettings.cpp:2013 msgid "Presets:" msgstr "" -#: Client/core/CSettings.cpp:2058 +#: Client/core/CSettings.cpp:2062 msgid "Chat" msgstr "" -#: Client/core/CSettings.cpp:2075 +#: Client/core/CSettings.cpp:2079 msgid "Load" msgstr "" -#: Client/core/CSettings.cpp:2087 +#: Client/core/CSettings.cpp:2091 msgid "Colors" msgstr "" -#: Client/core/CSettings.cpp:2088 +#: Client/core/CSettings.cpp:2092 msgid "Layout" msgstr "" -#: Client/core/CSettings.cpp:2089 Client/core/CSettings.cpp:2335 +#: Client/core/CSettings.cpp:2093 Client/core/CSettings.cpp:2339 msgid "Options" msgstr "" -#: Client/core/CSettings.cpp:2095 +#: Client/core/CSettings.cpp:2099 msgid "Chat Background" msgstr "" -#: Client/core/CSettings.cpp:2095 +#: Client/core/CSettings.cpp:2099 msgid "Chat Text" msgstr "" -#: Client/core/CSettings.cpp:2095 +#: Client/core/CSettings.cpp:2099 msgid "Input Background" msgstr "" -#: Client/core/CSettings.cpp:2095 +#: Client/core/CSettings.cpp:2099 msgid "Input Text" msgstr "" -#: Client/core/CSettings.cpp:2118 +#: Client/core/CSettings.cpp:2122 msgid "Lines:" msgstr "" -#: Client/core/CSettings.cpp:2118 +#: Client/core/CSettings.cpp:2122 msgid "Scale:" msgstr "" -#: Client/core/CSettings.cpp:2118 +#: Client/core/CSettings.cpp:2122 msgid "Width:" msgstr "" -#: Client/core/CSettings.cpp:2121 +#: Client/core/CSettings.cpp:2125 msgid "Size" msgstr "" -#: Client/core/CSettings.cpp:2170 +#: Client/core/CSettings.cpp:2174 msgid "after" msgstr "" -#: Client/core/CSettings.cpp:2170 +#: Client/core/CSettings.cpp:2174 msgid "for" msgstr "" -#: Client/core/CSettings.cpp:2170 +#: Client/core/CSettings.cpp:2174 msgid "sec" msgstr "" -#: Client/core/CSettings.cpp:2173 +#: Client/core/CSettings.cpp:2177 msgid "Fading" msgstr "" -#: Client/core/CSettings.cpp:2179 +#: Client/core/CSettings.cpp:2183 msgid "Fade out old lines" msgstr "" -#: Client/core/CSettings.cpp:2219 +#: Client/core/CSettings.cpp:2223 msgid "Horizontal:" msgstr "" -#: Client/core/CSettings.cpp:2219 +#: Client/core/CSettings.cpp:2223 msgid "Vertical:" msgstr "" -#: Client/core/CSettings.cpp:2219 +#: Client/core/CSettings.cpp:2223 msgid "Text-Align:" msgstr "" -#: Client/core/CSettings.cpp:2219 +#: Client/core/CSettings.cpp:2223 msgid "X-Offset:" msgstr "" -#: Client/core/CSettings.cpp:2220 +#: Client/core/CSettings.cpp:2224 msgid "Y-Offset:" msgstr "" -#: Client/core/CSettings.cpp:2226 +#: Client/core/CSettings.cpp:2230 msgid "Position" msgstr "" -#: Client/core/CSettings.cpp:2241 Client/core/CSettings.cpp:2255 +#: Client/core/CSettings.cpp:2245 Client/core/CSettings.cpp:2259 msgid "Center" msgstr "" -#: Client/core/CSettings.cpp:2254 +#: Client/core/CSettings.cpp:2258 msgid "Top" msgstr "" -#: Client/core/CSettings.cpp:2256 +#: Client/core/CSettings.cpp:2260 msgid "Bottom" msgstr "" -#: Client/core/CSettings.cpp:2304 +#: Client/core/CSettings.cpp:2308 msgid "Font" msgstr "" -#: Client/core/CSettings.cpp:2341 +#: Client/core/CSettings.cpp:2345 msgid "Hide background when not typing" msgstr "" -#: Client/core/CSettings.cpp:2346 +#: Client/core/CSettings.cpp:2350 msgid "Nickname completion using the \"Tab\" key" msgstr "" -#: Client/core/CSettings.cpp:2351 +#: Client/core/CSettings.cpp:2355 msgid "Allow server to flash the window" msgstr "" -#: Client/core/CSettings.cpp:2356 +#: Client/core/CSettings.cpp:2360 msgid "Allow tray balloon notifications" msgstr "" -#: Client/core/CSettings.cpp:2361 +#: Client/core/CSettings.cpp:2365 msgid "Chat text black/white outline" msgstr "" @@ -2756,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:2610 Client/core/CSettings.cpp:2617 +#: 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:2611 +#: Client/core/CSettings.cpp:2615 msgid "Binding a primary key" msgstr "" -#: Client/core/CSettings.cpp:2618 +#: Client/core/CSettings.cpp:2622 msgid "Binding a secondary key" msgstr "" -#: Client/core/CSettings.cpp:2694 +#: Client/core/CSettings.cpp:2698 msgid "GTA GAME CONTROLS" msgstr "" -#: Client/core/CSettings.cpp:2696 +#: Client/core/CSettings.cpp:2700 msgid "MULTIPLAYER CONTROLS" msgstr "" -#: Client/core/CSettings.cpp:2941 Client/core/CSettings.cpp:4764 +#: Client/core/CSettings.cpp:2945 Client/core/CSettings.cpp:4777 msgid "Your nickname contains invalid characters!" msgstr "" -#: Client/core/CSettings.cpp:3778 +#: Client/core/CSettings.cpp:3791 msgid "Red:" msgstr "" -#: Client/core/CSettings.cpp:3778 +#: Client/core/CSettings.cpp:3791 msgid "Green:" msgstr "" -#: Client/core/CSettings.cpp:3778 +#: Client/core/CSettings.cpp:3791 msgid "Blue:" msgstr "" -#: Client/core/CSettings.cpp:3778 +#: Client/core/CSettings.cpp:3791 msgid "Transparency:" msgstr "" -#: Client/core/CSettings.cpp:3781 +#: Client/core/CSettings.cpp:3794 msgid "Color" msgstr "" -#: Client/core/CSettings.cpp:3858 +#: Client/core/CSettings.cpp:3871 msgid "Preview" msgstr "" -#: Client/core/CSettings.cpp:4166 +#: Client/core/CSettings.cpp:4179 msgid "Please disconnect before changing language" msgstr "" -#: Client/core/CSettings.cpp:4194 +#: Client/core/CSettings.cpp:4207 msgid "Please disconnect before changing skin" msgstr "" -#: Client/core/CSettings.cpp:4482 +#: 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:4486 +#: Client/core/CSettings.cpp:4499 msgid "PERFORMANCE WARNING" msgstr "" -#: Client/core/CSettings.cpp:4506 +#: 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:4508 +#: Client/core/CSettings.cpp:4521 msgid "SCREEN UPLOAD INFORMATION" msgstr "" -#: Client/core/CSettings.cpp:4523 +#: Client/core/CSettings.cpp:4536 msgid "" "Some scripts may play sounds, such as radio, from the internet.\n" "\n" @@ -2842,11 +2846,11 @@ msgid "" "bandwidth consumption.\n" msgstr "" -#: Client/core/CSettings.cpp:4526 +#: Client/core/CSettings.cpp:4539 msgid "EXTERNAL SOUNDS" msgstr "" -#: Client/core/CSettings.cpp:4555 +#: 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" @@ -2854,11 +2858,11 @@ msgid "" "This includes yours unique ID identifier." msgstr "" -#: Client/core/CSettings.cpp:4560 +#: Client/core/CSettings.cpp:4573 msgid "CONSENT TO ALLOW DATA SHARING" msgstr "" -#: Client/core/CSettings.cpp:4584 +#: 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" @@ -2868,7 +2872,7 @@ msgid "" "Are you sure you want to use them?" msgstr "" -#: Client/core/CSettings.cpp:4633 +#: 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" @@ -2877,77 +2881,77 @@ msgid "" "Are you sure you want to enable this option?" msgstr "" -#: Client/core/CSettings.cpp:4639 +#: Client/core/CSettings.cpp:4652 msgid "EXPERIMENTAL FEATURE" msgstr "" -#: Client/core/CSettings.cpp:4782 +#: Client/core/CSettings.cpp:4795 msgid "Please enter a nickname" msgstr "" -#: Client/core/CSettings.cpp:4783 +#: 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:4801 +#: Client/core/CSettings.cpp:4814 msgid "Very experimental feature." msgstr "" -#: Client/core/CSettings.cpp:4803 +#: Client/core/CSettings.cpp:4816 msgid "Stops stalls with CJ variations (Uses 65MB more RAM)" msgstr "" -#: Client/core/CSettings.cpp:4805 +#: Client/core/CSettings.cpp:4818 msgid "Older routers may require a slower scan speed." msgstr "" -#: Client/core/CSettings.cpp:4807 +#: Client/core/CSettings.cpp:4820 msgid "Switch on to use only one connection when downloading." msgstr "" -#: Client/core/CSettings.cpp:4809 +#: Client/core/CSettings.cpp:4822 msgid "Tag network packets to help ISPs identify MTA traffic." msgstr "" -#: Client/core/CSettings.cpp:4811 +#: Client/core/CSettings.cpp:4824 msgid "Spinning circle animation at the bottom of the screen" msgstr "" -#: Client/core/CSettings.cpp:4813 +#: Client/core/CSettings.cpp:4826 msgid "Select default always. (This setting is not saved)" msgstr "" -#: Client/core/CSettings.cpp:4815 +#: Client/core/CSettings.cpp:4828 msgid "Maximum is usually best" msgstr "" -#: Client/core/CSettings.cpp:4817 Client/core/CSettings.cpp:4819 +#: Client/core/CSettings.cpp:4830 Client/core/CSettings.cpp:4832 msgid "Auto updater:" msgstr "" -#: Client/core/CSettings.cpp:4817 +#: Client/core/CSettings.cpp:4830 msgid "Select default unless you like filling out bug reports." msgstr "" -#: Client/core/CSettings.cpp:4819 +#: Client/core/CSettings.cpp:4832 msgid "Select default to automatically install important updates." msgstr "" -#: Client/core/CSettings.cpp:4821 +#: Client/core/CSettings.cpp:4834 msgid "16-bit color:" msgstr "" -#: Client/core/CSettings.cpp:4821 +#: Client/core/CSettings.cpp:4834 msgid "Enable 16 bit color modes - Requires MTA restart" msgstr "" -#: Client/core/CSettings.cpp:4823 +#: Client/core/CSettings.cpp:4836 msgid "Mouse fix:" msgstr "" -#: Client/core/CSettings.cpp:4823 +#: Client/core/CSettings.cpp:4836 msgid "Mouse movement fix - May need PC restart" msgstr "" 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