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..0397dbf264 100644 --- a/Client/core/CClientVariables.cpp +++ b/Client/core/CClientVariables.cpp @@ -256,6 +256,7 @@ void CClientVariables::ValidateValues() ClampValue("mtavolume", 0.0f, 1.0f); ClampValue("voicevolume", 0.0f, 1.0f); ClampValue("mapalpha", 0, 255); + ClampValue("mapimage", 0, 1); } void CClientVariables::LoadDefaults() @@ -313,7 +314,8 @@ void CClientVariables::LoadDefaults() DEFAULT("mastervolume", 1.0f); // master volume DEFAULT("mtavolume", 1.0f); // custom sound's volume DEFAULT("voicevolume", 1.0f); // voice chat output volume - DEFAULT("mapalpha", 155); // map alpha + DEFAULT("mapalpha", 155); // player map alpha + DEFAULT("mapimage", 0); // player map image DEFAULT("browser_speed", 1); // Browser speed DEFAULT("single_download", 0); // Single connection for downloads DEFAULT("packet_tag", 0); // Tag network packets @@ -358,6 +360,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/CConsole.h b/Client/core/CConsole.h index 5899fa645d..677e1133ff 100644 --- a/Client/core/CConsole.h +++ b/Client/core/CConsole.h @@ -41,7 +41,6 @@ class CConsole : public CConsoleInterface bool IsInputActive(); void ActivateInput(); - void HandleTextAccepted(bool bHandled); void GetCommandInfo(const std::string& strIn, std::string& strCmdOut, std::string& strCmdLineOut); void ResetHistoryChanges(); 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/CQueryReceiver.cpp b/Client/core/CQueryReceiver.cpp index c0a1cf1125..559691bcb3 100644 --- a/Client/core/CQueryReceiver.cpp +++ b/Client/core/CQueryReceiver.cpp @@ -183,7 +183,7 @@ SQueryInfo CQueryReceiver::GetServerResponse() // Recover server ping status if present const SString strPingStatus = strBuildNumber.Right(strBuildNumber.length() - strlen(strBuildNumber) - 1); - CCore::GetSingleton().GetNetwork()->UpdatePingStatus(*strPingStatus, info.players); + CCore::GetSingleton().GetNetwork()->UpdatePingStatus(*strPingStatus, info.players, info.isStatusVerified); // Recover server http port if present const SString strNetRoute = strPingStatus.Right(strPingStatus.length() - strlen(strPingStatus) - 1); @@ -213,7 +213,15 @@ SQueryInfo CQueryReceiver::GetServerResponse() return info; } } + InvalidateSocket(); + + if (info.players > info.playerSlot) + { + info.players = info.playerSlot; + info.isStatusVerified = false; + } + info.containingInfo = true; } diff --git a/Client/core/CQueryReceiver.h b/Client/core/CQueryReceiver.h index f55e1004f4..4bc56b90d7 100644 --- a/Client/core/CQueryReceiver.h +++ b/Client/core/CQueryReceiver.h @@ -16,6 +16,7 @@ struct SQueryInfo { containingInfo = false; port = 0; + isStatusVerified = true; isPassworded = false; serials = false; players = 0; @@ -33,6 +34,7 @@ struct SQueryInfo SString gameType; SString mapName; SString versionText; + bool isStatusVerified; bool isPassworded; bool serials; ushort players; diff --git a/Client/core/CSettings.cpp b/Client/core/CSettings.cpp index 847735a891..6792bac450 100644 --- a/Client/core/CSettings.cpp +++ b/Client/core/CSettings.cpp @@ -376,7 +376,7 @@ void CSettings::CreateGUI() m_pButtonGenerateNickIcon->SetProperty("DistributeCapturedInputs", "True"); m_pSavePasswords = reinterpret_cast(pManager->CreateCheckBox(pTabMultiplayer, _("Save server passwords"), true)); - m_pSavePasswords->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 50.0f)); + m_pSavePasswords->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 35.0f)); m_pSavePasswords->GetPosition(vecTemp, false); m_pSavePasswords->AutoSize(NULL, 20.0f); @@ -411,11 +411,13 @@ void CSettings::CreateGUI() m_pCheckBoxCustomizedSAFiles->AutoSize(NULL, 20.0f); m_pMapRenderingLabel = reinterpret_cast(pManager->CreateLabel(pTabMultiplayer, _("Map rendering options"))); - m_pMapRenderingLabel->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 29.0f)); + m_pMapRenderingLabel->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 30.0f)); m_pMapRenderingLabel->GetPosition(vecTemp, false); m_pMapRenderingLabel->SetFont("default-bold-small"); m_pMapRenderingLabel->AutoSize(); + vecTemp.fX += 5.0f; + m_pMapAlphaLabel = reinterpret_cast(pManager->CreateLabel(pTabMultiplayer, _("Opacity:"))); m_pMapAlphaLabel->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 24.0f)); m_pMapAlphaLabel->GetPosition(vecTemp, false); @@ -433,6 +435,20 @@ void CSettings::CreateGUI() m_pMapAlphaValueLabel->GetPosition(vecTemp, false); m_pMapAlphaValueLabel->AutoSize("100%"); + m_pMapAlphaLabel->GetPosition(vecTemp, false); + vecTemp.fY += 24.0f; + + m_pPlayerMapImageLabel = reinterpret_cast(pManager->CreateLabel(pTabMultiplayer, _("Image resolution:"))); + m_pPlayerMapImageLabel->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 2.0f)); + m_pPlayerMapImageLabel->AutoSize(); + + m_pPlayerMapImageCombo = reinterpret_cast(pManager->CreateComboBox(pTabMultiplayer, "")); + m_pPlayerMapImageCombo->SetPosition(CVector2D(vecTemp.fX + fIndentX + 5.0f, vecTemp.fY - 1.0f)); + m_pPlayerMapImageCombo->SetSize(CVector2D(170.f, 95.0f)); + m_pPlayerMapImageCombo->AddItem(_("1024 x 1024 (Default)")); // index 0 + m_pPlayerMapImageCombo->AddItem(_("2048 x 2048")); // index 1 + m_pPlayerMapImageCombo->SetReadOnly(true); + /** * Audio tab **/ @@ -625,16 +641,13 @@ void CSettings::CreateGUI() * Video tab **/ fIndentX = pManager->CGUI_GetMaxTextExtent("default-normal", _("Resolution:"), _("FOV:"), _("Draw Distance:"), _("Brightness:"), _("FX Quality:"), - _("Anisotropic filtering:"), _("Anti-aliasing:"), _("Aspect Ratio:"), _("Opacity:")); + _("Anisotropic filtering:"), _("Anti-aliasing:"), _("Aspect Ratio:")); - m_pVideoGeneralLabel = reinterpret_cast(pManager->CreateLabel(pTabVideo, _("General"))); - m_pVideoGeneralLabel->SetPosition(CVector2D(11, 13)); - m_pVideoGeneralLabel->GetPosition(vecTemp, false); - m_pVideoGeneralLabel->AutoSize(NULL, 3.0f); - m_pVideoGeneralLabel->SetFont("default-bold-small"); + vecTemp.fX = 11.0f; + vecTemp.fY = 13.0f; m_pVideoResolutionLabel = reinterpret_cast(pManager->CreateLabel(pTabVideo, _("Resolution:"))); - m_pVideoResolutionLabel->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 26.0f)); + m_pVideoResolutionLabel->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY)); m_pVideoResolutionLabel->GetPosition(vecTemp, false); m_pVideoResolutionLabel->AutoSize(); @@ -833,6 +846,10 @@ void CSettings::CreateGUI() m_pCheckBoxBlur->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 130.0f)); m_pCheckBoxBlur->AutoSize(NULL, 20.0f); + m_pCheckBoxCoronaReflections = reinterpret_cast(pManager->CreateCheckBox(pTabVideo, _("Corona rain reflections"), true)); + m_pCheckBoxCoronaReflections->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY + 150.0f)); + m_pCheckBoxCoronaReflections->AutoSize(nullptr, 20.0f); + float fPosY = vecTemp.fY; m_pCheckBoxMinimize = reinterpret_cast(pManager->CreateCheckBox(pTabVideo, _("Full Screen Minimize"), true)); m_pCheckBoxMinimize->SetPosition(CVector2D(vecTemp.fX + 245.0f, fPosY + 30.0f)); @@ -878,10 +895,6 @@ void CSettings::CreateGUI() m_pCheckBoxHighDetailPeds->SetPosition(CVector2D(vecTemp.fX + 245.0f, fPosY + 110.0f)); m_pCheckBoxHighDetailPeds->AutoSize(NULL, 20.0f); - m_pCheckBoxCoronaReflections = reinterpret_cast(pManager->CreateCheckBox(pTabVideo, _("Corona rain reflections"), true)); - m_pCheckBoxCoronaReflections->SetPosition(CVector2D(vecTemp.fX + 245.0f, fPosY + 130.0f)); - m_pCheckBoxCoronaReflections->AutoSize(NULL, 20.0f); - vecTemp.fY += 10; m_pTabs->GetSize(vecTemp); @@ -917,6 +930,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); @@ -1006,6 +1023,7 @@ void CSettings::CreateGUI() 5.0f; vecTemp.fX += 10.0f; + // Fast clothes loading m_pFastClothesLabel = reinterpret_cast(pManager->CreateLabel(pTabAdvanced, _("Fast CJ clothes loading:"))); m_pFastClothesLabel->SetPosition(CVector2D(vecTemp.fX, vecTemp.fY)); @@ -1234,7 +1252,7 @@ void CSettings::CreateGUI() vecTemp.fX -= fComboWidth + 15; // Description label - vecTemp.fY = 354 + 10; + vecTemp.fY += 15.0f; m_pAdvancedSettingDescriptionLabel = reinterpret_cast(pManager->CreateLabel(pTabAdvanced, "")); m_pAdvancedSettingDescriptionLabel->SetPosition(CVector2D(vecTemp.fX + 10.f, vecTemp.fY)); m_pAdvancedSettingDescriptionLabel->SetFont("default-bold-small"); @@ -1625,12 +1643,17 @@ void CSettings::UpdateVideoTab() float fPos = SharedUtil::Unlerp(g_pCore->GetMinStreamingMemory(), uiStreamingMemory, g_pCore->GetMaxStreamingMemory()); m_pStreamingMemory->SetScrollPosition(fPos); + // Player map alpha int iVar = 0; CVARS_GET("mapalpha", iVar); int iAlphaPercent = ceil(((float)Clamp(0, iVar, 255) / 255) * 100); m_pMapAlphaValueLabel->SetText(SString("%i%%", iAlphaPercent).c_str()); float sbPos = (float)iAlphaPercent / 100.0f; m_pMapAlpha->SetScrollPosition(sbPos); + + // Player map image + CVARS_GET("mapimage", iVar); + m_pPlayerMapImageCombo->SetSelectedItemByIndex(iVar); } // @@ -1847,7 +1870,9 @@ bool CSettings::OnVideoDefaultClick(CGUIElement* pElement) CVARS_SET("streaming_memory", g_pCore->GetMaxStreamingMemory()); + // Player map defaults CVARS_SET("mapalpha", 155); + CVARS_SET("mapimage", 0); // Display restart required message if required bool bIsAntiAliasingChanged = gameSettings->GetAntiAliasing() != m_pComboAntiAliasing->GetSelectedItemIndex(); @@ -3287,6 +3312,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(); } @@ -3603,12 +3630,16 @@ void CSettings::SaveData() CVARS_SET("update_auto_install", iSelected); } - // Map alpha + // Player map alpha SString sText = m_pMapAlphaValueLabel->GetText(); - float fMapAlpha = ((atof(sText.substr(0, sText.length() - 1).c_str())) / 100) * 255; CVARS_SET("mapalpha", fMapAlpha); + // Player map image + int selectedComboIndex = m_pPlayerMapImageCombo->GetSelectedItemIndex(); + if (selectedComboIndex != -1) + CVARS_SET("mapimage", selectedComboIndex); + // Language CGUIListItem* pItem = m_pInterfaceLanguageSelector->GetSelectedItem(); if (pItem) @@ -3711,6 +3742,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 +3758,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..9c288557e6 100644 --- a/Client/core/CSettings.h +++ b/Client/core/CSettings.h @@ -196,6 +196,8 @@ class CSettings CGUIComboBox* m_pFullscreenStyleCombo; CGUILabel* m_pPriorityLabel; CGUIComboBox* m_pPriorityCombo; + CGUILabel* m_pPlayerMapImageLabel; + CGUIComboBox* m_pPlayerMapImageCombo; CGUILabel* m_pFastClothesLabel; CGUIComboBox* m_pFastClothesCombo; CGUILabel* m_pAudioGeneralLabel; @@ -338,6 +340,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/core/ServerBrowser/CServerBrowser.cpp b/Client/core/ServerBrowser/CServerBrowser.cpp index 764078e563..1246276b70 100644 --- a/Client/core/ServerBrowser/CServerBrowser.cpp +++ b/Client/core/ServerBrowser/CServerBrowser.cpp @@ -1081,7 +1081,8 @@ void CServerBrowser::AddServerToList(CServerListItem* pServer, const ServerBrows const SString strVersion = !bIncludeOtherVersions ? "" : pServer->strVersion; const SString strVersionSortKey = pServer->strVersionSortKey + pServer->strTieBreakSortKey; - const SString strPlayers = pServer->nMaxPlayers == 0 ? "" : SString("%d / %d", pServer->nPlayers, pServer->nMaxPlayers); + const SString strVerified = pServer->isStatusVerified ? "" : "*"; + const SString strPlayers = pServer->nMaxPlayers == 0 ? "" : SString("%d / %d %s", pServer->nPlayers, pServer->nMaxPlayers, *strVerified); const SString strPlayersSortKey = SString("%04d-", pServer->nMaxPlayers ? pServer->nPlayers + 1 : 0) + pServer->strTieBreakSortKey; const SString strPing = pServer->nPing == 9999 ? "" : SString("%d", pServer->nPing); @@ -1125,6 +1126,12 @@ void CServerBrowser::AddServerToList(CServerListItem* pServer, const ServerBrows m_pServerList[Type]->SetItemColor(iIndex, m_hPing[Type], color.R, color.G, color.B, color.A); m_pServerList[Type]->SetItemColor(iIndex, m_hGame[Type], color.R, color.G, color.B, color.A); + if (!pServer->isStatusVerified) + { + SColor orange = SColorRGBA(230, 200, 180, color.A); + m_pServerList[Type]->SetItemColor(iIndex, m_hPlayers[Type], orange.R, orange.G, orange.B, orange.A); + } + // If the index was modified from the original, then update all indexes because it means there was some sort if (pServer->iRowIndex != iIndex) UpdateRowIndexMembers(Type); diff --git a/Client/core/ServerBrowser/CServerInfo.cpp b/Client/core/ServerBrowser/CServerInfo.cpp index 2b79599c8d..6571fedc32 100644 --- a/Client/core/ServerBrowser/CServerInfo.cpp +++ b/Client/core/ServerBrowser/CServerInfo.cpp @@ -469,13 +469,15 @@ void CServerInfo::Connect() void CServerInfo::ResetServerGUI(CServerListItem* pServer) { + const SString strVerified = pServer->isStatusVerified ? "" : "*"; + // Set our GUI elements to display the server information m_pServerNameLabel->SetText(pServer->strName.c_str()); m_pServerAddressLabel->SetText(pServer->strEndpoint.c_str()); m_pGamemodeLabel->SetText(pServer->strGameMode.c_str()); m_pMapLabel->SetText(pServer->strMap.c_str()); - m_pPlayersLabel->SetText(SString("%i/%i", pServer->nPlayers, pServer->nMaxPlayers).c_str()); - + m_pPlayersLabel->SetText(SString("%d / %d %s", pServer->nPlayers, pServer->nMaxPlayers, *strVerified).c_str()); + m_pPasswordedLabel->SetText(pServer->bPassworded ? _("Yes") : _("No")); m_pLatencyLabel->SetText(SString("%i", pServer->nPing)); diff --git a/Client/core/ServerBrowser/CServerList.cpp b/Client/core/ServerBrowser/CServerList.cpp index 021328d777..044f88e496 100644 --- a/Client/core/ServerBrowser/CServerList.cpp +++ b/Client/core/ServerBrowser/CServerList.cpp @@ -514,6 +514,7 @@ bool CServerListItem::ParseQuery() if ((uiMasterServerSaysRestrictions & RESTRICTION_PLAYER_LIST) == false) vecPlayers = info.playersPool; + isStatusVerified = info.isStatusVerified; bScanned = true; PostChange(); diff --git a/Client/core/ServerBrowser/CServerList.h b/Client/core/ServerBrowser/CServerList.h index e2f0b2864f..5d0e450873 100644 --- a/Client/core/ServerBrowser/CServerList.h +++ b/Client/core/ServerBrowser/CServerList.h @@ -139,6 +139,7 @@ class CServerListItem bScanned = false; bSkipped = false; bSerials = false; + isStatusVerified = true; bPassworded = false; bKeepFlag = false; iRowIndex = -1; @@ -182,6 +183,7 @@ class CServerListItem unsigned short nPlayers; // Current players unsigned short nMaxPlayers; // Maximum players unsigned short nPing; // Ping time + bool isStatusVerified; // Ping status verified bool bPassworded; // Password protected bool bSerials; // Serial verification on bool bScanned; diff --git a/Client/game_sa/CAnimBlendAssociationSA.cpp b/Client/game_sa/CAnimBlendAssociationSA.cpp index 5496d2ebff..3f9a3ac94f 100644 --- a/Client/game_sa/CAnimBlendAssociationSA.cpp +++ b/Client/game_sa/CAnimBlendAssociationSA.cpp @@ -113,6 +113,11 @@ std::unique_ptr CAnimBlendAssociationSA::GetAnimHierarchy() return pGame->GetAnimManager()->GetAnimBlendHierarchy(m_pInterface->pAnimHierarchy); } +const std::unique_ptr CAnimBlendAssociationSA::GetAnimHierarchy() const noexcept +{ + return pGame->GetAnimManager()->GetAnimBlendHierarchy(m_pInterface->pAnimHierarchy); +} + void CAnimBlendAssociationSA::SetCurrentProgress(float fProgress) { float fTime = m_pInterface->pAnimHierarchy->fTotalTime * fProgress; diff --git a/Client/game_sa/CAnimBlendAssociationSA.h b/Client/game_sa/CAnimBlendAssociationSA.h index 13b37e86f2..715ee41c28 100644 --- a/Client/game_sa/CAnimBlendAssociationSA.h +++ b/Client/game_sa/CAnimBlendAssociationSA.h @@ -16,6 +16,7 @@ #include #include #include +#include #include "CAnimBlendNodeSA.h" class CAnimBlendAssocGroupSA; @@ -159,12 +160,15 @@ class CAnimBlendAssociationSA : public CAnimBlendAssociation eAnimGroup GetAnimGroup() { return static_cast(m_pInterface->sAnimGroup); } eAnimID GetAnimID() { return static_cast(m_pInterface->sAnimID); } std::unique_ptr GetAnimHierarchy(); + const std::unique_ptr GetAnimHierarchy() const noexcept; float GetBlendAmount() { return m_pInterface->fBlendAmount; } void SetBlendAmount(float fAmount) { m_pInterface->fBlendAmount = fAmount; } void SetCurrentProgress(float fProgress); - float GetCurrentSpeed() { return m_pInterface->fSpeed; } + float GetCurrentProgress() const noexcept { return m_pInterface->fCurrentTime; } + float GetCurrentSpeed() const noexcept { return m_pInterface->fSpeed; } void SetCurrentSpeed(float fSpeed) { m_pInterface->fSpeed = fSpeed; } + float GetLength() const noexcept { return GetAnimHierarchy()->GetTotalTime(); } void SetAnimID(short sAnimID) { m_pInterface->sAnimID = sAnimID; } void SetAnimGroup(short sAnimGroup) { m_pInterface->sAnimGroup = sAnimGroup; } void SetFlags(short sFlags) { m_pInterface->m_nFlags = sFlags; } diff --git a/Client/game_sa/CAnimBlendHierarchySA.h b/Client/game_sa/CAnimBlendHierarchySA.h index 585a0bb1fd..2adf4c070f 100644 --- a/Client/game_sa/CAnimBlendHierarchySA.h +++ b/Client/game_sa/CAnimBlendHierarchySA.h @@ -53,6 +53,7 @@ class CAnimBlendHierarchySA : public CAnimBlendHierarchy void RemoveFromUncompressedCache(); void RemoveQuaternionFlips(); void CalculateTotalTime(); + float GetTotalTime() const noexcept { return m_pInterface->fTotalTime; } CAnimBlendSequenceSAInterface* GetSequence(DWORD dwIndex); CAnimBlendSequenceSAInterface* GetSequences() { return m_pInterface->pSequences; } unsigned short GetNumSequences() { return m_pInterface->usNumSequences; } diff --git a/Client/game_sa/CGameSA.cpp b/Client/game_sa/CGameSA.cpp index 07ac611c09..918091d482 100644 --- a/Client/game_sa/CGameSA.cpp +++ b/Client/game_sa/CGameSA.cpp @@ -848,6 +848,34 @@ void CGameSA::SetRoadSignsTextEnabled(bool isEnabled) m_isRoadSignsTextEnabled = isEnabled; } +void CGameSA::SetIgnoreFireStateEnabled(bool isEnabled) +{ + if (isEnabled == m_isIgnoreFireStateEnabled) + return; + + if (isEnabled) + { + MemSet((void*)0x6511B9, 0x90, 10); // CCarEnterExit::IsVehicleStealable + MemSet((void*)0x643A95, 0x90, 14); // CTaskComplexEnterCar::CreateFirstSubTask + MemSet((void*)0x6900B5, 0x90, 14); // CTaskComplexCopInCar::ControlSubTask + MemSet((void*)0x64F3DB, 0x90, 14); // CCarEnterExit::IsPlayerToQuitCarEnter + + MemSet((void*)0x685A7F, 0x90, 14); // CTaskSimplePlayerOnFoot::ProcessPlayerWeapon + } + else + { + // Restore original bytes + MemCpy((void*)0x6511B9, "\x88\x86\x90\x04\x00\x00\x85\xC0\x75\x3E", 10); + MemCpy((void*)0x643A95, "\x8B\x88\x90\x04\x00\x00\x85\xC9\x0F\x85\x99\x01\x00\x00", 14); + MemCpy((void*)0x6900B5, "\x8B\x81\x90\x04\x00\x00\x85\xC0\x0F\x85\x1A\x01\x00\x00", 14); + MemCpy((void*)0x64F3DB, "\x8B\x85\x90\x04\x00\x00\x85\xC0\x0F\x85\x1B\x01\x00\x00", 14); + + MemCpy((void*)0x685A7F, "\x8B\x86\x30\x07\x00\x00\x85\xC0\x0F\x85\x1D\x01\x00\x00", 14); + } + + m_isIgnoreFireStateEnabled = isEnabled; +} + bool CGameSA::PerformChecks() { std::map::iterator it; diff --git a/Client/game_sa/CGameSA.h b/Client/game_sa/CGameSA.h index cf4788d953..33731af858 100644 --- a/Client/game_sa/CGameSA.h +++ b/Client/game_sa/CGameSA.h @@ -249,6 +249,8 @@ class CGameSA : public CGame bool IsTunnelWeatherBlendEnabled() const noexcept override { return m_isTunnelWeatherBlendEnabled; } void SetTunnelWeatherBlendEnabled(bool isEnabled) override; + bool IsIgnoreFireStateEnabled() const noexcept override { return m_isIgnoreFireStateEnabled; } + void SetIgnoreFireStateEnabled(bool isEnabled) override; unsigned long GetMinuteDuration(); void SetMinuteDuration(unsigned long ulTime); @@ -378,6 +380,7 @@ class CGameSA : public CGame bool m_isRoadSignsTextEnabled{true}; bool m_isBuildingsRemoved{false}; bool m_isExtendedWaterCannonsEnabled{false}; + bool m_isIgnoreFireStateEnabled{false}; static unsigned int& ClumpOffset; diff --git a/Client/game_sa/CModelInfoSA.cpp b/Client/game_sa/CModelInfoSA.cpp index 2db97a5245..4bf3146d7f 100644 --- a/Client/game_sa/CModelInfoSA.cpp +++ b/Client/game_sa/CModelInfoSA.cpp @@ -743,7 +743,7 @@ CBoundingBox* CModelInfoSA::GetBoundingBox() bool CModelInfoSA::IsValid() { if (m_dwModelID >= MODELINFO_DFF_MAX && m_dwModelID < MODELINFO_TXD_MAX) - return !pGame->GetPools()->IsFreeTextureDictonarySlot(m_dwModelID - MODELINFO_DFF_MAX); + return !pGame->GetPools()->GetTxdPool().IsFreeTextureDictonarySlot(m_dwModelID - MODELINFO_DFF_MAX); if (m_dwModelID >= pGame->GetBaseIDforTXD() && m_dwModelID < pGame->GetCountOfAllFileIDs()) return true; diff --git a/Client/game_sa/CPoolsSA.cpp b/Client/game_sa/CPoolsSA.cpp index 42c534dcaa..1aaac0b40d 100644 --- a/Client/game_sa/CPoolsSA.cpp +++ b/Client/game_sa/CPoolsSA.cpp @@ -24,9 +24,6 @@ #include "CTrailerSA.h" #include "CTrainSA.h" #include "CWorldSA.h" -#include "CKeyGenSA.h" -#include "CFileLoaderSA.h" -#include "CPtrNodeSingleListSA.h" extern CGameSA* pGame; @@ -35,7 +32,6 @@ CPoolsSA::CPoolsSA() m_ppPedPoolInterface = (CPoolSAInterface**)0xB74490; m_ppObjectPoolInterface = (CPoolSAInterface**)0xB7449C; m_ppVehiclePoolInterface = (CPoolSAInterface**)0xB74494; - m_ppTxdPoolInterface = (CPoolSAInterface**)0xC8800C; m_bGetVehicleEnabled = true; } @@ -1107,40 +1103,3 @@ void CPoolsSA::InvalidateLocalPlayerClientEntity() { m_pedPool.arrayOfClientEntities[0] = {m_pedPool.arrayOfClientEntities[0].pEntity, nullptr}; } - -unsigned int CPoolsSA::AllocateTextureDictonarySlot(uint uiSlotId, std::string& strTxdName) -{ - CTextureDictonarySAInterface* pTxd = (*m_ppTxdPoolInterface)->AllocateAt(uiSlotId); - if (!pTxd) - return -1; - - strTxdName.resize(24); - - pTxd->usUsagesCount = 0; - pTxd->hash = pGame->GetKeyGen()->GetUppercaseKey(strTxdName.c_str()); - pTxd->rwTexDictonary = nullptr; - pTxd->usParentIndex = -1; - - return (*m_ppTxdPoolInterface)->GetObjectIndex(pTxd); -} - -void CPoolsSA::RemoveTextureDictonarySlot(uint uiTxdId) -{ - if (!(*m_ppTxdPoolInterface)->IsContains(uiTxdId)) - return; - - typedef uint(__cdecl * Function_TxdReleaseSlot)(uint uiTxdId); - ((Function_TxdReleaseSlot)(0x731E90))(uiTxdId); - - (*m_ppTxdPoolInterface)->Release(uiTxdId); -} - -bool CPoolsSA::IsFreeTextureDictonarySlot(uint uiTxdId) -{ - return (*m_ppTxdPoolInterface)->IsEmpty(uiTxdId); -} - -ushort CPoolsSA::GetFreeTextureDictonarySlot() -{ - return (*m_ppTxdPoolInterface)->GetFreeSlot(); -} diff --git a/Client/game_sa/CPoolsSA.h b/Client/game_sa/CPoolsSA.h index 0e6d3d9634..5718421d6c 100644 --- a/Client/game_sa/CPoolsSA.h +++ b/Client/game_sa/CPoolsSA.h @@ -15,9 +15,9 @@ #include "CVehicleSA.h" #include "CObjectSA.h" #include "CBuildingSA.h" -#include "CTextureDictonarySA.h" #include "CBuildingsPoolSA.h" #include "CDummyPoolSA.h" +#include "CTxdPoolSA.h" #define INVALID_POOL_ARRAY_ID 0xFFFFFFFF @@ -91,14 +91,9 @@ class CPoolsSA : public CPools void ResetPedPoolCount() { m_pedPool.ulCount = 0; } void InvalidateLocalPlayerClientEntity(); - uint AllocateTextureDictonarySlot(uint uiSlotID, std::string& strTxdName); - void RemoveTextureDictonarySlot(uint uiTxdId); - bool IsFreeTextureDictonarySlot(uint uiTxdId); - - ushort GetFreeTextureDictonarySlot(); - CBuildingsPool& GetBuildingsPool() noexcept override { return m_BuildingsPool; }; CDummyPool& GetDummyPool() noexcept { return m_DummyPool; }; + CTxdPool& GetTxdPool() noexcept { return m_TxdPool; }; private: // Pools @@ -109,10 +104,10 @@ class CPoolsSA : public CPools CPoolSAInterface** m_ppPedPoolInterface; CPoolSAInterface** m_ppObjectPoolInterface; CPoolSAInterface** m_ppVehiclePoolInterface; - CPoolSAInterface** m_ppTxdPoolInterface; CBuildingsPoolSA m_BuildingsPool; CDummyPoolSA m_DummyPool; + CTxdPoolSA m_TxdPool; bool m_bGetVehicleEnabled; }; 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/CTxdPoolSA.cpp b/Client/game_sa/CTxdPoolSA.cpp new file mode 100644 index 0000000000..248f825836 --- /dev/null +++ b/Client/game_sa/CTxdPoolSA.cpp @@ -0,0 +1,57 @@ +/***************************************************************************** + * + * PROJECT: Multi Theft Auto + * LICENSE: See LICENSE in the top level directory + * + * Multi Theft Auto is available from https://www.multitheftauto.com/ + * + *****************************************************************************/ + +#include "StdInc.h" +#include "CTxdPoolSA.h" +#include "CGameSA.h" +#include "CKeyGenSA.h" + +extern CGameSA* pGame; + +CTxdPoolSA::CTxdPoolSA() +{ + m_ppTxdPoolInterface = (CPoolSAInterface**)0xC8800C; +} + +std::uint32_t CTxdPoolSA::AllocateTextureDictonarySlot(std::uint32_t uiSlotId, std::string& strTxdName) +{ + CTextureDictonarySAInterface* pTxd = (*m_ppTxdPoolInterface)->AllocateAt(uiSlotId); + if (!pTxd) + return -1; + + strTxdName.resize(24); + + pTxd->usUsagesCount = 0; + pTxd->hash = pGame->GetKeyGen()->GetUppercaseKey(strTxdName.c_str()); + pTxd->rwTexDictonary = nullptr; + pTxd->usParentIndex = -1; + + return (*m_ppTxdPoolInterface)->GetObjectIndex(pTxd); +} + +void CTxdPoolSA::RemoveTextureDictonarySlot(std::uint32_t uiTxdId) +{ + if (!(*m_ppTxdPoolInterface)->IsContains(uiTxdId)) + return; + + typedef std::uint32_t(__cdecl * Function_TxdReleaseSlot)(std::uint32_t uiTxdId); + ((Function_TxdReleaseSlot)(0x731E90))(uiTxdId); + + (*m_ppTxdPoolInterface)->Release(uiTxdId); +} + +bool CTxdPoolSA::IsFreeTextureDictonarySlot(std::uint32_t uiTxdId) +{ + return (*m_ppTxdPoolInterface)->IsEmpty(uiTxdId); +} + +std::uint16_t CTxdPoolSA::GetFreeTextureDictonarySlot() +{ + return (*m_ppTxdPoolInterface)->GetFreeSlot(); +} diff --git a/Client/game_sa/CTxdPoolSA.h b/Client/game_sa/CTxdPoolSA.h new file mode 100644 index 0000000000..c1f0ed8ece --- /dev/null +++ b/Client/game_sa/CTxdPoolSA.h @@ -0,0 +1,31 @@ +/***************************************************************************** + * + * PROJECT: Multi Theft Auto + * LICENSE: See LICENSE in the top level directory + * + * Multi Theft Auto is available from https://www.multitheftauto.com/ + * + *****************************************************************************/ + +#pragma once + +#include +#include "CPoolSAInterface.h" +#include "CBuildingSA.h" +#include "CTextureDictonarySA.h" + +class CTxdPoolSA final : public CTxdPool +{ +public: + CTxdPoolSA(); + ~CTxdPoolSA() = default; + + std::uint32_t AllocateTextureDictonarySlot(std::uint32_t uiSlotID, std::string& strTxdName); + void RemoveTextureDictonarySlot(std::uint32_t uiTxdId); + bool IsFreeTextureDictonarySlot(std::uint32_t uiTxdId); + + std::uint16_t GetFreeTextureDictonarySlot(); + +private: + CPoolSAInterface** m_ppTxdPoolInterface; +}; diff --git a/Client/game_sa/CVehicleSA.cpp b/Client/game_sa/CVehicleSA.cpp index bb59ac1bb0..7731db8c36 100644 --- a/Client/game_sa/CVehicleSA.cpp +++ b/Client/game_sa/CVehicleSA.cpp @@ -1346,16 +1346,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; } } @@ -1593,9 +1597,10 @@ bool CVehicleSA::SpawnFlyingComponent(const eCarNodes& nodeIndex, const eCarComp if (removalTime <= -1 || !componentObject) return true; - std::uint32_t CTimer_ms = *reinterpret_cast(VAR_CTimer_snTimeInMilliseconds); - componentObject->uiObjectRemovalTime = CTimer_ms + static_cast(removalTime); + // Set double-sided + componentObject->bBackfaceCulled = true; + componentObject->uiObjectRemovalTime = pGame->GetSystemTime() + static_cast(removalTime); return true; } diff --git a/Client/game_sa/CVehicleSA.h b/Client/game_sa/CVehicleSA.h index ff7908dcc4..9734c14e08 100644 --- a/Client/game_sa/CVehicleSA.h +++ b/Client/game_sa/CVehicleSA.h @@ -106,8 +106,6 @@ struct RwTexture; #define OFFSET_CBike_Nodes 0x5A0 #define OFFSET_CBoat_Nodes 0x5B0 -#define VAR_CTimer_snTimeInMilliseconds 0xB7CB84 - struct SRailNodeSA { short sX; // x coordinate times 8 diff --git a/Client/game_sa/TaskBasicSA.cpp b/Client/game_sa/TaskBasicSA.cpp index 9ef743a9b8..18ca6e38a4 100644 --- a/Client/game_sa/TaskBasicSA.cpp +++ b/Client/game_sa/TaskBasicSA.cpp @@ -13,6 +13,27 @@ #include "TaskBasicSA.h" #include "CPedSA.h" + +CTaskSimpleRunNamedAnimSAInterface* CTaskSimpleRunNamedAnimSA::GetAnimationInterface() noexcept +{ + return reinterpret_cast(this->GetInterface()); +} + +const CTaskSimpleRunNamedAnimSAInterface* CTaskSimpleRunNamedAnimSA::GetAnimationInterface() const noexcept +{ + return reinterpret_cast(this->GetInterface()); +} + +const char* CTaskSimpleRunNamedAnimSA::GetAnimName() const noexcept +{ + return GetAnimationInterface()->m_animName; +} + +const char* CTaskSimpleRunNamedAnimSA::GetGroupName() const noexcept +{ + return GetAnimationInterface()->m_animGroupName; +} + CTaskComplexUseMobilePhoneSA::CTaskComplexUseMobilePhoneSA(const int iDuration) { CreateTaskInterface(sizeof(CTaskComplexUseMobilePhoneSAInterface)); diff --git a/Client/game_sa/TaskBasicSA.h b/Client/game_sa/TaskBasicSA.h index 2f8f18dc70..914d5d7181 100644 --- a/Client/game_sa/TaskBasicSA.h +++ b/Client/game_sa/TaskBasicSA.h @@ -113,6 +113,12 @@ class CTaskSimpleRunNamedAnimSA : public virtual CTaskSimpleAnimSA, public virtu CTaskSimpleRunNamedAnimSA(const char* pAnimName, const char* pAnimGroupName, const int flags, const float fBlendDelta, const int iTime = -1, const bool bDontInterrupt = false, const bool bRunInSequence = false, const bool bOffsetPed = false, const bool bHoldLastFrame = false); + + CTaskSimpleRunNamedAnimSAInterface* GetAnimationInterface() noexcept; + const CTaskSimpleRunNamedAnimSAInterface* GetAnimationInterface() const noexcept; + + const char* GetAnimName() const noexcept override; + const char* GetGroupName() const noexcept override; }; class CTaskComplexDieSAInterface : public CTaskComplexSAInterface diff --git a/Client/game_sa/TaskSA.h b/Client/game_sa/TaskSA.h index 1022b070b0..c47116044b 100644 --- a/Client/game_sa/TaskSA.h +++ b/Client/game_sa/TaskSA.h @@ -85,7 +85,8 @@ class CTaskSA : public virtual CTask // our function(s) void SetInterface(CTaskSAInterface* pInterface) { TaskInterface = pInterface; }; - CTaskSAInterface* GetInterface() { return TaskInterface; } + CTaskSAInterface* GetInterface() noexcept { return TaskInterface; } + const CTaskSAInterface* GetInterface() const noexcept { return TaskInterface; } bool IsValid() { return GetInterface() != NULL; } void CreateTaskInterface(size_t nSize); diff --git a/Client/mods/deathmatch/CClient.cpp b/Client/mods/deathmatch/CClient.cpp index ec17655996..e532ef2f71 100644 --- a/Client/mods/deathmatch/CClient.cpp +++ b/Client/mods/deathmatch/CClient.cpp @@ -64,17 +64,17 @@ int CClient::ClientInitialize(const char* szArguments, CCoreInterface* pCore) g_pCore->GetCommands()->Add("enter_passenger", _("enters a car as passenger"), COMMAND_EnterPassenger, true, true); g_pCore->GetCommands()->Add("radio_next", _("next radio channel"), COMMAND_RadioNext, true, true); g_pCore->GetCommands()->Add("radio_previous", _("previous radio channel"), COMMAND_RadioPrevious, true, true); - g_pCore->GetCommands()->Add("radar", _("enables the radar view"), COMMAND_RadarMap, true, true); - g_pCore->GetCommands()->Add("radar_zoom_in", _("zooms the radar in"), COMMAND_RadarZoomIn, true, true); - g_pCore->GetCommands()->Add("radar_zoom_out", _("zooms the radar out"), COMMAND_RadarZoomOut, true, true); - g_pCore->GetCommands()->Add("radar_move_north", _("moves the radar north"), COMMAND_RadarMoveNorth, true, true); - g_pCore->GetCommands()->Add("radar_move_south", _("moves the radar south"), COMMAND_RadarMoveSouth, true, true); - g_pCore->GetCommands()->Add("radar_move_east", _("moves the radar east"), COMMAND_RadarMoveEast, true, true); - g_pCore->GetCommands()->Add("radar_move_west", _("moves the radar west"), COMMAND_RadarMoveWest, true, true); - g_pCore->GetCommands()->Add("radar_attach", _("attaches the radar"), COMMAND_RadarAttach, true, true); - g_pCore->GetCommands()->Add("radar_opacity_down", _("reduces radar opacity"), COMMAND_RadarOpacityDown, true, true); - g_pCore->GetCommands()->Add("radar_opacity_up", _("increases radar opacity"), COMMAND_RadarOpacityUp, true, true); - g_pCore->GetCommands()->Add("radar_help", _("toggles radar help text"), COMMAND_RadarHelp, true, true); + g_pCore->GetCommands()->Add("radar", _("enables the player-map view"), COMMAND_PlayerMap, true, true); + g_pCore->GetCommands()->Add("radar_zoom_in", _("zooms the player-map in"), COMMAND_PlayerMapZoomIn, true, true); + g_pCore->GetCommands()->Add("radar_zoom_out", _("zooms the player-map out"), COMMAND_PlayerMapZoomOut, true, true); + g_pCore->GetCommands()->Add("radar_move_north", _("moves the player-map north"), COMMAND_PlayerMapMoveNorth, true, true); + g_pCore->GetCommands()->Add("radar_move_south", _("moves the player-map south"), COMMAND_PlayerMapMoveSouth, true, true); + g_pCore->GetCommands()->Add("radar_move_east", _("moves the player-map east"), COMMAND_PlayerMapMoveEast, true, true); + g_pCore->GetCommands()->Add("radar_move_west", _("moves the player-map west"), COMMAND_PlayerMapMoveWest, true, true); + g_pCore->GetCommands()->Add("radar_attach", _("attaches the player-map"), COMMAND_PlayerMapAttach, true, true); + g_pCore->GetCommands()->Add("radar_opacity_down", _("reduces player-map opacity"), COMMAND_PlayerMapOpacityDown, true, true); + g_pCore->GetCommands()->Add("radar_opacity_up", _("increases player-map opacity"), COMMAND_PlayerMapOpacityUp, true, true); + g_pCore->GetCommands()->Add("radar_help", _("toggles player-map help text"), COMMAND_PlayerMapHelp, true, true); g_pCore->GetCommands()->Add("msg_target", _("sends a message to the targetted player"), COMMAND_MessageTarget, true); g_pCore->GetCommands()->Add("vehicle_next_weapon", _("changes to the next weapon whilst in a vehicle"), COMMAND_VehicleNextWeapon, true); g_pCore->GetCommands()->Add("vehicle_previous_weapon", _("changes to the previous weapon whilst in a vehicle"), COMMAND_VehiclePreviousWeapon, true); diff --git a/Client/mods/deathmatch/ClientCommands.cpp b/Client/mods/deathmatch/ClientCommands.cpp index 6ca4d73625..123ee59dcb 100644 --- a/Client/mods/deathmatch/ClientCommands.cpp +++ b/Client/mods/deathmatch/ClientCommands.cpp @@ -235,154 +235,137 @@ void COMMAND_Screenshot ( const char* szCmdLine ) } */ -void COMMAND_RadarMap(const char* szCmdLine) +void COMMAND_PlayerMap(const char* szCmdLine) { - int iCmd = (szCmdLine && szCmdLine[0]) ? atoi(szCmdLine) : -1; - bool bShow = (iCmd == 1) ? true : (iCmd == 0) ? false : !g_pClientGame->GetRadarMap()->GetRadarEnabled(); - g_pClientGame->GetRadarMap()->SetRadarEnabled(bShow); + int cmd = (szCmdLine && szCmdLine[0]) ? atoi(szCmdLine) : -1; + bool show = (cmd == 1) ? true : (cmd == 0) ? false : !g_pClientGame->GetPlayerMap()->GetPlayerMapEnabled(); + g_pClientGame->GetPlayerMap()->SetPlayerMapEnabled(show); } -void COMMAND_RadarZoomIn(const char* szCmdLine) +void COMMAND_PlayerMapZoomIn(const char* szCmdLine) { - CRadarMap* pRadarMap = g_pClientGame->GetRadarMap(); - - if (pRadarMap->IsRadarShowing()) - { - pRadarMap->ZoomIn(); - } + CPlayerMap* playerMap = g_pClientGame->GetPlayerMap(); + if (playerMap->IsPlayerMapShowing()) + playerMap->ZoomIn(); } -void COMMAND_RadarZoomOut(const char* szCmdLine) +void COMMAND_PlayerMapZoomOut(const char* szCmdLine) { - CRadarMap* pRadarMap = g_pClientGame->GetRadarMap(); - - if (pRadarMap->IsRadarShowing()) - { - pRadarMap->ZoomOut(); - } + CPlayerMap* playerMap = g_pClientGame->GetPlayerMap(); + if (playerMap->IsPlayerMapShowing()) + playerMap->ZoomOut(); } -void COMMAND_RadarMoveNorth(const char* szCmdLine) +void COMMAND_PlayerMapMoveNorth(const char* szCmdLine) { - CRadarMap* pRadarMap = g_pClientGame->GetRadarMap(); + CPlayerMap* playerMap = g_pClientGame->GetPlayerMap(); + if (!playerMap->IsPlayerMapShowing()) + return; - if (pRadarMap->IsRadarShowing()) + if (playerMap->IsMovingNorth()) + playerMap->SetMovingNorth(false); + else if (playerMap->IsMovingSouth()) + playerMap->SetMovingSouth(false); + else { - // Toggle on/off - if (pRadarMap->IsMovingNorth()) - pRadarMap->SetMovingNorth(false); - else if (pRadarMap->IsMovingSouth()) - pRadarMap->SetMovingSouth(false); - else - { - pRadarMap->SetMovingNorth(true); - pRadarMap->SetMovingSouth(false); - pRadarMap->SetMovingEast(false); - pRadarMap->SetMovingWest(false); - } + playerMap->SetMovingNorth(true); + playerMap->SetMovingSouth(false); + playerMap->SetMovingEast(false); + playerMap->SetMovingWest(false); } } -void COMMAND_RadarMoveSouth(const char* szCmdLine) +void COMMAND_PlayerMapMoveSouth(const char* szCmdLine) { - CRadarMap* pRadarMap = g_pClientGame->GetRadarMap(); + CPlayerMap* playerMap = g_pClientGame->GetPlayerMap(); + if (!playerMap->IsPlayerMapShowing()) + return; - if (pRadarMap->IsRadarShowing()) + if (playerMap->IsMovingSouth()) + playerMap->SetMovingSouth(false); + else if (playerMap->IsMovingNorth()) + playerMap->SetMovingNorth(false); + else { - // Toggle on/off - if (pRadarMap->IsMovingSouth()) - pRadarMap->SetMovingSouth(false); - else if (pRadarMap->IsMovingNorth()) - pRadarMap->SetMovingNorth(false); - else - { - pRadarMap->SetMovingNorth(false); - pRadarMap->SetMovingSouth(true); - pRadarMap->SetMovingEast(false); - pRadarMap->SetMovingWest(false); - } + playerMap->SetMovingNorth(false); + playerMap->SetMovingSouth(true); + playerMap->SetMovingEast(false); + playerMap->SetMovingWest(false); } } -void COMMAND_RadarMoveEast(const char* szCmdLine) +void COMMAND_PlayerMapMoveEast(const char* szCmdLine) { - CRadarMap* pRadarMap = g_pClientGame->GetRadarMap(); + CPlayerMap* playerMap = g_pClientGame->GetPlayerMap(); + if (!playerMap->IsPlayerMapShowing()) + return; - if (pRadarMap->IsRadarShowing()) + if (playerMap->IsMovingEast()) + playerMap->SetMovingEast(false); + else if (playerMap->IsMovingWest()) + playerMap->SetMovingWest(false); + else { - // Toggle on/off - if (pRadarMap->IsMovingEast()) - pRadarMap->SetMovingEast(false); - else if (pRadarMap->IsMovingWest()) - pRadarMap->SetMovingWest(false); - else - { - pRadarMap->SetMovingNorth(false); - pRadarMap->SetMovingSouth(false); - pRadarMap->SetMovingEast(true); - pRadarMap->SetMovingWest(false); - } + playerMap->SetMovingNorth(false); + playerMap->SetMovingSouth(false); + playerMap->SetMovingEast(true); + playerMap->SetMovingWest(false); } } -void COMMAND_RadarMoveWest(const char* szCmdLine) +void COMMAND_PlayerMapMoveWest(const char* szCmdLine) { - CRadarMap* pRadarMap = g_pClientGame->GetRadarMap(); + CPlayerMap* playerMap = g_pClientGame->GetPlayerMap(); + if (!playerMap->IsPlayerMapShowing()) + return; - if (pRadarMap->IsRadarShowing()) + if (playerMap->IsMovingWest()) + playerMap->SetMovingWest(false); + else if (playerMap->IsMovingEast()) + playerMap->SetMovingEast(false); + else { - // Toggle on/off - if (pRadarMap->IsMovingWest()) - pRadarMap->SetMovingWest(false); - else if (pRadarMap->IsMovingEast()) - pRadarMap->SetMovingEast(false); - else - { - pRadarMap->SetMovingNorth(false); - pRadarMap->SetMovingSouth(false); - pRadarMap->SetMovingEast(false); - pRadarMap->SetMovingWest(true); - } + playerMap->SetMovingNorth(false); + playerMap->SetMovingSouth(false); + playerMap->SetMovingEast(false); + playerMap->SetMovingWest(true); } } -void COMMAND_RadarAttach(const char* szCmdLine) +void COMMAND_PlayerMapAttach(const char* szCmdLine) { - CRadarMap* pRadarMap = g_pClientGame->GetRadarMap(); - - if (pRadarMap->IsRadarShowing()) - { - pRadarMap->SetAttachedToLocalPlayer(!g_pClientGame->GetRadarMap()->IsAttachedToLocalPlayer()); - } + CPlayerMap* playerMap = g_pClientGame->GetPlayerMap(); + if (playerMap->IsPlayerMapShowing()) + playerMap->SetAttachedToLocalPlayer(!g_pClientGame->GetPlayerMap()->IsAttachedToLocalPlayer()); } -void COMMAND_RadarOpacityDown(const char* szCmdLine) +void COMMAND_PlayerMapOpacityDown(const char* szCmdLine) { - CRadarMap* pRadarMap = g_pClientGame->GetRadarMap(); - if (pRadarMap->IsRadarShowing()) - { - int iAlpha; - g_pCore->GetCVars()->Get("mapalpha", iAlpha); - iAlpha = std::max(0, iAlpha - 20); - g_pCore->GetCVars()->Set("mapalpha", iAlpha); - } + CPlayerMap* playerMap = g_pClientGame->GetPlayerMap(); + if (!playerMap->IsPlayerMapShowing()) + return; + + int mapAlpha; + g_pCore->GetCVars()->Get("mapalpha", mapAlpha); + mapAlpha = std::max(0, mapAlpha - 20); + g_pCore->GetCVars()->Set("mapalpha", mapAlpha); } -void COMMAND_RadarOpacityUp(const char* szCmdLine) +void COMMAND_PlayerMapOpacityUp(const char* szCmdLine) { - CRadarMap* pRadarMap = g_pClientGame->GetRadarMap(); - if (pRadarMap->IsRadarShowing()) - { - int iAlpha; - g_pCore->GetCVars()->Get("mapalpha", iAlpha); - iAlpha = std::min(255, iAlpha + 20); - g_pCore->GetCVars()->Set("mapalpha", iAlpha); - } + CPlayerMap* playerMap = g_pClientGame->GetPlayerMap(); + if (!playerMap->IsPlayerMapShowing()) + return; + + int mapAlpha; + g_pCore->GetCVars()->Get("mapalpha", mapAlpha); + mapAlpha = std::min(255, mapAlpha + 20); + g_pCore->GetCVars()->Set("mapalpha", mapAlpha); } -void COMMAND_RadarHelp(const char* szCmdLine) +void COMMAND_PlayerMapHelp(const char* szCmdLine) { - g_pClientGame->GetRadarMap()->ToggleHelpText(); + g_pClientGame->GetPlayerMap()->ToggleHelpText(); } void COMMAND_MessageTarget(const char* szCmdLine) diff --git a/Client/mods/deathmatch/ClientCommands.h b/Client/mods/deathmatch/ClientCommands.h index c6aa755099..af31db12d4 100644 --- a/Client/mods/deathmatch/ClientCommands.h +++ b/Client/mods/deathmatch/ClientCommands.h @@ -21,17 +21,17 @@ void COMMAND_ShowNetstat(const char* szCmdLine); void COMMAND_EnterPassenger(const char* szCmdLine); void COMMAND_RadioNext(const char* szCmdLine); void COMMAND_RadioPrevious(const char* szCmdLine); -void COMMAND_RadarMap(const char* szCmdLine); -void COMMAND_RadarZoomIn(const char* szCmdLine); -void COMMAND_RadarZoomOut(const char* szCmdLine); -void COMMAND_RadarMoveNorth(const char* szCmdLine); -void COMMAND_RadarMoveSouth(const char* szCmdLine); -void COMMAND_RadarMoveEast(const char* szCmdLine); -void COMMAND_RadarMoveWest(const char* szCmdLine); -void COMMAND_RadarAttach(const char* szCmdLine); -void COMMAND_RadarOpacityDown(const char* szCmdLine); -void COMMAND_RadarOpacityUp(const char* szCmdLine); -void COMMAND_RadarHelp(const char* szCmdLine); +void COMMAND_PlayerMap(const char* szCmdLine); +void COMMAND_PlayerMapZoomIn(const char* szCmdLine); +void COMMAND_PlayerMapZoomOut(const char* szCmdLine); +void COMMAND_PlayerMapMoveNorth(const char* szCmdLine); +void COMMAND_PlayerMapMoveSouth(const char* szCmdLine); +void COMMAND_PlayerMapMoveEast(const char* szCmdLine); +void COMMAND_PlayerMapMoveWest(const char* szCmdLine); +void COMMAND_PlayerMapAttach(const char* szCmdLine); +void COMMAND_PlayerMapOpacityDown(const char* szCmdLine); +void COMMAND_PlayerMapOpacityUp(const char* szCmdLine); +void COMMAND_PlayerMapHelp(const char* szCmdLine); void COMMAND_MessageTarget(const char* szCmdLine); void COMMAND_VehicleNextWeapon(const char* szCmdLine); void COMMAND_VehiclePreviousWeapon(const char* szCmdLine); diff --git a/Client/mods/deathmatch/logic/CClientGame.cpp b/Client/mods/deathmatch/logic/CClientGame.cpp index bc20947eac..52ca69f3f0 100644 --- a/Client/mods/deathmatch/logic/CClientGame.cpp +++ b/Client/mods/deathmatch/logic/CClientGame.cpp @@ -135,6 +135,7 @@ CClientGame::CClientGame(bool bLocalPlay) : m_ServerInfo(new CServerInfo()) m_Glitches[GLITCH_BADDRIVEBYHITBOX] = false; m_Glitches[GLITCH_QUICKSTAND] = false; m_Glitches[GLITCH_KICKOUTOFVEHICLE_ONMODELREPLACE] = false; + g_pMultiplayer->DisableBadDrivebyHitboxes(true); // Remove Night & Thermal vision view (if enabled). @@ -227,7 +228,7 @@ CClientGame::CClientGame(bool bLocalPlay) : m_ServerInfo(new CServerInfo()) m_pObjectSync = new CObjectSync(m_pObjectManager); #endif m_pNametags = new CNametags(m_pManager); - m_pRadarMap = new CRadarMap(m_pManager); + m_pPlayerMap = new CPlayerMap(m_pManager); // Set the screenshot path /* This is now done in CCore, to maintain a global screenshot path @@ -548,7 +549,7 @@ CClientGame::~CClientGame() #endif SAFE_DELETE(m_pBlendedWeather); SAFE_DELETE(m_pMovingObjectsManager); - SAFE_DELETE(m_pRadarMap); + SAFE_DELETE(m_pPlayerMap); SAFE_DELETE(m_pRemoteCalls); SAFE_DELETE(m_pLuaManager); SAFE_DELETE(m_pLatentTransferManager); @@ -1097,7 +1098,7 @@ void CClientGame::DoPulsePostFrame() CClientPerfStatManager::GetSingleton()->DoPulse(); } - m_pRadarMap->DoRender(); + m_pPlayerMap->DoRender(); m_pManager->DoRender(); DoPulses(); @@ -1435,8 +1436,8 @@ void CClientGame::DoPulses() } // Check for radar input - m_pRadarMap->DoPulse(); - g_pCore->GetGraphics()->SetAspectRatioAdjustmentSuspended(m_pRadarMap->IsRadarShowing()); + m_pPlayerMap->DoPulse(); + g_pCore->GetGraphics()->SetAspectRatioAdjustmentSuspended(m_pPlayerMap->IsPlayerMapShowing()); // Got a local player? if (m_pLocalPlayer) @@ -5406,8 +5407,8 @@ void CClientGame::ResetMapInfo() // Keybinds g_pCore->GetKeyBinds()->SetAllControlsEnabled(true, true, true); - // Radarmap - m_pRadarMap->SetForcedState(false); + // Player map + m_pPlayerMap->SetForcedState(false); // Camera m_pCamera->FadeOut(0.0f, 0, 0, 0); @@ -5456,10 +5457,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); @@ -6029,6 +6026,9 @@ bool CClientGame::SetWorldSpecialProperty(WorldSpecialProperty property, bool is case WorldSpecialProperty::TUNNELWEATHERBLEND: g_pGame->SetTunnelWeatherBlendEnabled(isEnabled); return true; + case WorldSpecialProperty::IGNOREFIRESTATE: + g_pGame->SetIgnoreFireStateEnabled(isEnabled); + return true; } return false; } @@ -6066,6 +6066,8 @@ bool CClientGame::IsWorldSpecialProperty(WorldSpecialProperty property) return g_pGame->IsRoadSignsTextEnabled(); case WorldSpecialProperty::TUNNELWEATHERBLEND: return g_pGame->IsTunnelWeatherBlendEnabled(); + case WorldSpecialProperty::IGNOREFIRESTATE: + return g_pGame->IsIgnoreFireStateEnabled(); } return false; } @@ -6479,7 +6481,7 @@ void CClientGame::OutputServerInfo() { SString strEnabledGlitches; const char* szGlitchNames[] = {"Quick reload", "Fast fire", "Fast move", "Crouch bug", "Close damage", "Hit anim", "Fast sprint", - "Bad driveby hitboxes", "Quick stand"}; + "Bad driveby hitboxes", "Quick stand", "Kickout of vehicle on model replace"}; for (uint i = 0; i < NUM_GLITCHES; i++) { if (IsGlitchEnabled(i)) @@ -6887,6 +6889,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/CClientGame.h b/Client/mods/deathmatch/logic/CClientGame.h index ba6bc29334..c76dc223aa 100644 --- a/Client/mods/deathmatch/logic/CClientGame.h +++ b/Client/mods/deathmatch/logic/CClientGame.h @@ -28,7 +28,7 @@ #include "CUnoccupiedVehicleSync.h" #include "CPedSync.h" #include "CObjectSync.h" -#include "CRadarMap.h" +#include "CPlayerMap.h" #include "CClientTeamManager.h" #include "CClientPedManager.h" #include "lua/CLuaManager.h" @@ -296,7 +296,7 @@ class CClientGame CBlendedWeather* GetBlendedWeather() { return m_pBlendedWeather; }; CNetAPI* GetNetAPI() { return m_pNetAPI; }; - CRadarMap* GetRadarMap() { return m_pRadarMap; }; + CPlayerMap* GetPlayerMap() { return m_pPlayerMap; }; CMovingObjectsManager* GetMovingObjectsManager() { return m_pMovingObjectsManager; } CClientPlayer* GetLocalPlayer() { return m_pLocalPlayer; } @@ -694,7 +694,7 @@ class CClientGame CNetworkStats* m_pNetworkStats; CSyncDebug* m_pSyncDebug; // CScreenshot* m_pScreenshot; - CRadarMap* m_pRadarMap; + CPlayerMap* m_pPlayerMap; CTransferBox* m_pTransferBox; CResourceManager* m_pResourceManager; CScriptKeyBinds* m_pScriptKeyBinds; diff --git a/Client/mods/deathmatch/logic/CClientModel.cpp b/Client/mods/deathmatch/logic/CClientModel.cpp index 795bc08579..fd1e6e4ab5 100644 --- a/Client/mods/deathmatch/logic/CClientModel.cpp +++ b/Client/mods/deathmatch/logic/CClientModel.cpp @@ -213,7 +213,7 @@ void CClientModel::RestoreDFF(CModelInfo* pModelInfo) bool CClientModel::AllocateTXD(std::string &strTxdName) { - uint uiSlotID = g_pGame->GetPools()->AllocateTextureDictonarySlot(m_iModelID - MAX_MODEL_DFF_ID, strTxdName); + std::uint32_t uiSlotID = g_pGame->GetPools()->GetTxdPool().AllocateTextureDictonarySlot(m_iModelID - MAX_MODEL_DFF_ID, strTxdName); if (uiSlotID != -1) { m_bAllocatedByUs = true; @@ -234,6 +234,6 @@ void CClientModel::RestoreTXD(CModelInfo* pModelInfo) pModelInfo->SetTextureDictionaryID(0); } - g_pGame->GetPools()->RemoveTextureDictonarySlot(uiTextureDictonarySlotID); + g_pGame->GetPools()->GetTxdPool().RemoveTextureDictonarySlot(uiTextureDictonarySlotID); g_pGame->GetStreaming()->SetStreamingInfo(pModelInfo->GetModel(), 0, 0, 0, -1); } diff --git a/Client/mods/deathmatch/logic/CClientModelManager.cpp b/Client/mods/deathmatch/logic/CClientModelManager.cpp index 36c601b544..9b4ae7cc39 100644 --- a/Client/mods/deathmatch/logic/CClientModelManager.cpp +++ b/Client/mods/deathmatch/logic/CClientModelManager.cpp @@ -76,7 +76,7 @@ int CClientModelManager::GetFirstFreeModelID(void) int CClientModelManager::GetFreeTxdModelID() { - ushort usTxdId = g_pGame->GetPools()->GetFreeTextureDictonarySlot(); + std::uint16_t usTxdId = g_pGame->GetPools()->GetTxdPool().GetFreeTextureDictonarySlot(); if (usTxdId == -1) return INVALID_MODEL_ID; return MAX_MODEL_DFF_ID + usTxdId; diff --git a/Client/mods/deathmatch/logic/CClientPad.cpp b/Client/mods/deathmatch/logic/CClientPad.cpp index f8c802ccbb..2f68b90baf 100644 --- a/Client/mods/deathmatch/logic/CClientPad.cpp +++ b/Client/mods/deathmatch/logic/CClientPad.cpp @@ -336,11 +336,9 @@ bool CClientPad::GetControlState(const char* szName, CControllerState& State, bo return State.LeftShoulder2 == 255; break; // zoom out case 9: - return false; - break; // enter_exit + return State.ButtonTriangle == 255; // enter_exit case 10: - return false; - break; // change_cam + return State.Select == 255; // change_cam case 11: return State.ButtonSquare == 255; break; // jump @@ -432,8 +430,7 @@ bool CClientPad::GetControlState(const char* szName, CControllerState& State, bo return State.RightShoulder2 == 255; break; // look right case 33: - return false; - break; // look behind + return State.LeftShoulder2 == 255 && State.RightShoulder2 == 255; // look behind case 34: return false; break; // mouse look diff --git a/Client/mods/deathmatch/logic/CClientPed.cpp b/Client/mods/deathmatch/logic/CClientPed.cpp index 891fcf78d8..0de89dc207 100644 --- a/Client/mods/deathmatch/logic/CClientPed.cpp +++ b/Client/mods/deathmatch/logic/CClientPed.cpp @@ -1394,6 +1394,10 @@ void CClientPed::WarpIntoVehicle(CClientVehicle* pVehicle, unsigned int uiSeat) } } + // Wrong seat or undefined passengers count? + if ((uiSeat > 0 && uiSeat > pVehicle->m_ucMaxPassengers) || (uiSeat > 0 && pVehicle->m_ucMaxPassengers == 255)) + return; + // Transfer WaitingForGroundToLoad state to vehicle if (m_bIsLocalPlayer) { @@ -5691,28 +5695,6 @@ bool CClientPed::IsRunningAnimation() return (m_AnimationCache.bLoop && m_pAnimationBlock); } -void CClientPed::RunAnimation(AssocGroupId animGroup, AnimationId animID) -{ - KillAnimation(); - - if (m_pPlayerPed) - { - // Remove jetpack now so it doesn't stay on (#9522#c25612) - if (HasJetPack()) - SetHasJetPack(false); - - // Let's not choke them any longer - if (IsChoking()) - SetChoking(false); - - CTask* pTask = g_pGame->GetTasks()->CreateTaskSimpleRunAnim(animGroup, animID, 4.0f, TASK_SIMPLE_ANIM, "TASK_SIMPLE_ANIM"); - if (pTask) - { - pTask->SetAsPedTask(m_pPlayerPed, TASK_PRIORITY_PRIMARY); - } - } -} - void CClientPed::RunNamedAnimation(std::unique_ptr& pBlock, const char* szAnimName, int iTime, int iBlend, bool bLoop, bool bUpdatePosition, bool bInterruptable, bool bFreezeLastFrame, bool bRunInSequence, bool bOffsetPed, bool bHoldLastFrame) { diff --git a/Client/mods/deathmatch/logic/CClientPed.h b/Client/mods/deathmatch/logic/CClientPed.h index bb6a921acd..49a3b25fcc 100644 --- a/Client/mods/deathmatch/logic/CClientPed.h +++ b/Client/mods/deathmatch/logic/CClientPed.h @@ -460,7 +460,6 @@ class CClientPed : public CClientStreamElement, public CAntiCheatModule bool GetRunningAnimationName(SString& strBlockName, SString& strAnimName); bool IsRunningAnimation(); - void RunAnimation(AssocGroupId animGroup, AnimationId animID); void RunNamedAnimation(std::unique_ptr& pBlock, const char* szAnimName, int iTime = -1, int iBlend = 250, bool bLoop = true, bool bUpdatePosition = true, bool bInterruptable = false, bool bFreezeLastFrame = true, bool bRunInSequence = false, bool bOffsetPed = false, bool bHoldLastFrame = false); diff --git a/Client/mods/deathmatch/logic/CClientVehicle.cpp b/Client/mods/deathmatch/logic/CClientVehicle.cpp index a45d850a30..537f9457dd 100644 --- a/Client/mods/deathmatch/logic/CClientVehicle.cpp +++ b/Client/mods/deathmatch/logic/CClientVehicle.cpp @@ -2656,7 +2656,12 @@ void CClientVehicle::Create() { if (m_pPassengers[i]) { - m_pPassengers[i]->WarpIntoVehicle(this, i + 1); + // Undefined passengers count? + if (m_ucMaxPassengers != 255) + m_pPassengers[i]->WarpIntoVehicle(this, i + 1); + else + m_pPassengers[i]->SetWarpInToVehicleRequired(false); + if (m_pPassengers[i]) m_pPassengers[i]->StreamIn(true); } diff --git a/Client/mods/deathmatch/logic/CPacketHandler.cpp b/Client/mods/deathmatch/logic/CPacketHandler.cpp index ebf2ba5140..787cd4c239 100644 --- a/Client/mods/deathmatch/logic/CPacketHandler.cpp +++ b/Client/mods/deathmatch/logic/CPacketHandler.cpp @@ -572,6 +572,10 @@ void CPacketHandler::Packet_ServerDisconnected(NetBitStreamInterface& bitStream) strReason = _("Disconnected: Serial verification failed"); strErrorCode = _E("CD44"); break; + case ePlayerDisconnectType::SERIAL_DUPLICATE: + strReason = _("Disconnected: Serial already in use"); + strErrorCode = _E("CD50"); + break; case ePlayerDisconnectType::CONNECTION_DESYNC: strReason = _("Disconnected: Connection desync %s"); strErrorCode = _E("CD45"); @@ -2393,6 +2397,7 @@ void CPacketHandler::Packet_MapInfo(NetBitStreamInterface& bitStream) g_pClientGame->SetWorldSpecialProperty(WorldSpecialProperty::ROADSIGNSTEXT, wsProps.data3.roadsignstext); g_pClientGame->SetWorldSpecialProperty(WorldSpecialProperty::EXTENDEDWATERCANNONS, wsProps.data4.extendedwatercannons); g_pClientGame->SetWorldSpecialProperty(WorldSpecialProperty::TUNNELWEATHERBLEND, wsProps.data5.tunnelweatherblend); + g_pClientGame->SetWorldSpecialProperty(WorldSpecialProperty::IGNOREFIRESTATE, wsProps.data6.ignoreFireState); float fJetpackMaxHeight = 100; if (!bitStream.Read(fJetpackMaxHeight)) diff --git a/Client/mods/deathmatch/logic/CPacketHandler.h b/Client/mods/deathmatch/logic/CPacketHandler.h index ca0f6f3d69..9a50b24615 100644 --- a/Client/mods/deathmatch/logic/CPacketHandler.h +++ b/Client/mods/deathmatch/logic/CPacketHandler.h @@ -42,7 +42,8 @@ class CPacketHandler BAN, KICK, CUSTOM, - SHUTDOWN + SHUTDOWN, + SERIAL_DUPLICATE }; struct SEntityDependantStuff diff --git a/Client/mods/deathmatch/logic/CRadarMap.cpp b/Client/mods/deathmatch/logic/CPlayerMap.cpp similarity index 71% rename from Client/mods/deathmatch/logic/CRadarMap.cpp rename to Client/mods/deathmatch/logic/CPlayerMap.cpp index 4dd01baccd..0653477e5b 100644 --- a/Client/mods/deathmatch/logic/CRadarMap.cpp +++ b/Client/mods/deathmatch/logic/CPlayerMap.cpp @@ -2,8 +2,8 @@ * * PROJECT: Multi Theft Auto v1.0 * LICENSE: See LICENSE in the top level directory - * FILE: mods/deathmatch/logic/CRadarMap.cpp - * PURPOSE: Full screen radar map renderer + * FILE: mods/deathmatch/logic/CPlayerMap.cpp + * PURPOSE: Full screen player map renderer * * Multi Theft Auto is available from http://www.multitheftauto.com/ * @@ -23,15 +23,19 @@ enum MARKER_LAST_SPRITE_INDEX = MARKER_FIRST_SPRITE_INDEX + RADAR_MARKER_LIMIT - 1, }; -CRadarMap::CRadarMap(CClientManager* pManager) +constexpr std::array MAP_IMAGE_SIZES = {1024, 2048}; + +CPlayerMap::CPlayerMap(CClientManager* pManager) { + m_failedToLoadTextures = false; + // Setup our managers m_pManager = pManager; m_pRadarMarkerManager = pManager->GetRadarMarkerManager(); m_pRadarAreaManager = m_pManager->GetRadarAreaManager(); - // Set the radar bools - m_bIsRadarEnabled = false; + // Set the map bools + m_bIsPlayerMapEnabled = false; m_bForcedState = false; m_bIsAttachedToLocal = false; m_bHideHelpText = false; @@ -52,17 +56,13 @@ CRadarMap::CRadarMap(CClientManager* pManager) m_fZoom = 1; m_iHorizontalMovement = 0; m_iVerticalMovement = 0; - SetupMapVariables(); - // Create the radar and local player blip images - m_pRadarImage = - g_pCore->GetGraphics()->GetRenderItemManager()->CreateTexture(CalcMTASAPath("MTA\\cgui\\images\\radar.jpg"), NULL, false, 1024, 1024, RFORMAT_DXT1); - m_pLocalPlayerBlip = g_pCore->GetGraphics()->GetRenderItemManager()->CreateTexture(CalcMTASAPath("MTA\\cgui\\images\\radarset\\02.png")); - - // Create the marker textures - CreateMarkerTextures(); + // Create all map textures + CreateAllTextures(); // Create the text displays for the help text + const SColorRGBA colorWhiteTransparent(255, 255, 255, 200); + const SColorRGBA colorWhite(255, 255, 255, 255); struct { SColor color; @@ -70,17 +70,15 @@ CRadarMap::CRadarMap(CClientManager* pManager) float fScale; SString strMessage; } messageList[] = { - {SColorRGBA(255, 255, 255, 200), 0.92f, 1.5f, "Current Mode: Kill all humans"}, - {SColorRGBA(255, 255, 255, 255), 0.95f, 1.0f, SString("Press %s to change mode.", *GetBoundKeyName("radar_attach"))}, - {SColorRGBA(255, 255, 255, 255), 0.05f, 1.0f, - SString("Press %s/%s to zoom in/out.", *GetBoundKeyName("radar_zoom_in"), *GetBoundKeyName("radar_zoom_out"))}, - {SColorRGBA(255, 255, 255, 255), 0.08f, 1.0f, - SString("Press %s, %s, %s, %s to navigate the map.", *GetBoundKeyName("radar_move_north"), *GetBoundKeyName("radar_move_east"), - *GetBoundKeyName("radar_move_south"), *GetBoundKeyName("radar_move_west"))}, - {SColorRGBA(255, 255, 255, 255), 0.11f, 1.0f, - SString("Press %s/%s to change opacity.", *GetBoundKeyName("radar_opacity_down"), *GetBoundKeyName("radar_opacity_up"))}, - {SColorRGBA(255, 255, 255, 255), 0.14f, 1.0f, SString("Press %s to hide the map.", *GetBoundKeyName("radar"))}, - {SColorRGBA(255, 255, 255, 255), 0.17f, 1.0f, SString("Press %s to hide this help text.", *GetBoundKeyName("radar_help"))}, + {colorWhiteTransparent, 0.92f, 1.5f, ""}, + {colorWhite, 0.95f, 1.0f, SString(_("Change mode: %s"), *GetBoundKeyName("radar_attach"))}, + + {colorWhite, 0.05f, 1.0f, SString(_("Zoom: %s/%s Movement: %s, %s, %s, %s Opacity: %s/%s"), + *GetBoundKeyName("radar_zoom_in"), *GetBoundKeyName("radar_zoom_out"), *GetBoundKeyName("radar_move_north"), + *GetBoundKeyName("radar_move_east"), *GetBoundKeyName("radar_move_south"), *GetBoundKeyName("radar_move_west"), + *GetBoundKeyName("radar_opacity_down"), *GetBoundKeyName("radar_opacity_up"))}, + {colorWhite, 0.07f, 1.0f, SString(_("Toggle map: %s Toggle help text: %s"), + *GetBoundKeyName("radar"), *GetBoundKeyName("radar_help"))}, }; for (uint i = 0; i < NUMELMS(messageList); i++) @@ -98,26 +96,85 @@ CRadarMap::CRadarMap(CClientManager* pManager) // Default to attached to player SetAttachedToLocalPlayer(true); + + SetupMapVariables(); } -CRadarMap::~CRadarMap() +CPlayerMap::~CPlayerMap() { // Delete our images - SAFE_RELEASE(m_pRadarImage); - SAFE_RELEASE(m_pLocalPlayerBlip); + SAFE_RELEASE(m_mapImageTexture); + SAFE_RELEASE(m_playerMarkerTexture); - for (uint i = 0; i < m_MarkerTextureList.size(); i++) - SAFE_RELEASE(m_MarkerTextureList[i]); + for (uint i = 0; i < m_markerTextureList.size(); i++) + SAFE_RELEASE(m_markerTextureList[i]); - m_MarkerTextureList.clear(); + m_markerTextureList.clear(); // Don't need to delete the help texts as those are destroyed by the display manager } -void CRadarMap::DoPulse() +void CPlayerMap::CreateOrUpdateMapTexture() { - // If our radar image exists - if (IsRadarShowing()) + const std::uint32_t mapSize = MAP_IMAGE_SIZES[m_playerMapImageIndex]; + const SString fileName("MTA\\cgui\\images\\map_%d.png", mapSize); + + auto* newTexture = g_pCore->GetGraphics()->GetRenderItemManager()->CreateTexture(CalcMTASAPath(fileName), nullptr, false, mapSize, mapSize, RFORMAT_DXT1); + if (!newTexture) + throw std::runtime_error("Failed to load map image"); + + SAFE_RELEASE(m_mapImageTexture); + m_mapImageTexture = newTexture; +} + +void CPlayerMap::UpdateOrRevertMapTexture(std::size_t newImageIndex) +{ + const std::size_t oldImageIndex = m_playerMapImageIndex; + try + { + m_playerMapImageIndex = newImageIndex; + CreateOrUpdateMapTexture(); + } + catch (const std::exception& e) + { + m_playerMapImageIndex = oldImageIndex; + g_pCore->GetConsole()->Printf("Problem updating map image: %s", e.what()); + } +} + +void CPlayerMap::CreatePlayerBlipTexture() +{ + m_playerMarkerTexture = g_pCore->GetGraphics()->GetRenderItemManager()->CreateTexture(CalcMTASAPath("MTA\\cgui\\images\\radarset\\02.png")); + if (!m_playerMarkerTexture) + throw std::runtime_error("Failed to load player blip image"); +} + +void CPlayerMap::CreateAllTextures() +{ + try + { + // Create the map texture + m_mapImageTexture = nullptr; + m_playerMapImageIndex = g_pCore->GetCVars()->GetValue("mapimage"); + CreateOrUpdateMapTexture(); + + // Create the player blip texture + CreatePlayerBlipTexture(); + + // Create the other marker textures + CreateMarkerTextures(); + } + catch (const std::exception& e) + { + m_failedToLoadTextures = true; + g_pCore->GetConsole()->Printf("Problem initializing player map: %s", e.what()); + } +} + +void CPlayerMap::DoPulse() +{ + // If our map image exists + if (IsPlayerMapShowing()) { // If we are following the local player blip if (m_bIsAttachedToLocal) @@ -154,11 +211,11 @@ void CRadarMap::DoPulse() } // -// Precreate all the textures for the radar map markers +// Precreate all the textures for the player map markers // -void CRadarMap::CreateMarkerTextures() +void CPlayerMap::CreateMarkerTextures() { - assert(m_MarkerTextureList.empty()); + m_markerTextureList.clear(); SString strRadarSetDirectory = CalcMTASAPath("MTA\\cgui\\images\\radarset\\"); // Load the 3 shapes @@ -166,25 +223,27 @@ void CRadarMap::CreateMarkerTextures() for (uint i = 0; i < NUMELMS(shapeFileNames); i++) { CTextureItem* pTextureItem = g_pCore->GetGraphics()->GetRenderItemManager()->CreateTexture(PathJoin(strRadarSetDirectory, shapeFileNames[i])); - m_MarkerTextureList.push_back(pTextureItem); + m_markerTextureList.push_back(pTextureItem); } - assert(m_MarkerTextureList.size() == MARKER_FIRST_SPRITE_INDEX); + if (m_markerTextureList.size() != MARKER_FIRST_SPRITE_INDEX) + throw std::runtime_error("Failed to load marker textures [1]"); // Load the icons for (uint i = 0; i < RADAR_MARKER_LIMIT; i++) { CTextureItem* pTextureItem = g_pCore->GetGraphics()->GetRenderItemManager()->CreateTexture(PathJoin(strRadarSetDirectory, SString("%02u.png", i + 1))); - m_MarkerTextureList.push_back(pTextureItem); + m_markerTextureList.push_back(pTextureItem); } - assert(m_MarkerTextureList.size() == MARKER_LAST_SPRITE_INDEX + 1); + if (m_markerTextureList.size() != MARKER_LAST_SPRITE_INDEX + 1) + throw std::runtime_error("Failed to load marker textures [2]"); } // // Get a texture for a marker, including scale and color // -CTextureItem* CRadarMap::GetMarkerTexture(CClientRadarMarker* pMarker, float fLocalZ, float* pfScale, SColor* pColor) +CTextureItem* CPlayerMap::GetMarkerTexture(CClientRadarMarker* pMarker, float fLocalZ, float* pfScale, SColor* pColor) { float fScale = pMarker->GetScale(); ulong ulSprite = pMarker->GetSprite(); @@ -220,26 +279,33 @@ CTextureItem* CRadarMap::GetMarkerTexture(CClientRadarMarker* pMarker, float fLo *pfScale = fScale; *pColor = color; - if (uiListIndex >= m_MarkerTextureList.size()) + if (uiListIndex >= m_markerTextureList.size()) return NULL; - return m_MarkerTextureList[uiListIndex]; + return m_markerTextureList[uiListIndex]; } -void CRadarMap::DoRender() +void CPlayerMap::DoRender() { - bool bIsRadarShowing = IsRadarShowing(); + bool isMapShowing = IsPlayerMapShowing(); - // Render if showing - if (bIsRadarShowing) + // Render if showing and textures are all loaded + if (isMapShowing && !m_failedToLoadTextures) { // Get the alpha value from the settings - int iRadarAlpha; - g_pCore->GetCVars()->Get("mapalpha", iRadarAlpha); + int mapAlpha; + g_pCore->GetCVars()->Get("mapalpha", mapAlpha); + const SColorARGB mapColor(mapAlpha, 255, 255, 255); + + // Update the image if the user changed it via a setting + auto mapImageIndex = g_pCore->GetCVars()->GetValue("mapimage"); + if (mapImageIndex != m_playerMapImageIndex) + { + UpdateOrRevertMapTexture(mapImageIndex); + } - g_pCore->GetGraphics()->DrawTexture(m_pRadarImage, static_cast(m_iMapMinX), static_cast(m_iMapMinY), - m_fMapSize / m_pRadarImage->m_uiSizeX, m_fMapSize / m_pRadarImage->m_uiSizeY, 0.0f, 0.0f, 0.0f, - SColorARGB(iRadarAlpha, 255, 255, 255)); + g_pCore->GetGraphics()->DrawTexture(m_mapImageTexture, static_cast(m_iMapMinX), static_cast(m_iMapMinY), + m_fMapSize / m_mapImageTexture->m_uiSizeX, m_fMapSize / m_mapImageTexture->m_uiSizeY, 0.0f, 0.0f, 0.0f, mapColor); // Grab the info for the local player blip CVector2D vecLocalPos; @@ -316,11 +382,11 @@ void CRadarMap::DoRender() } } - g_pCore->GetGraphics()->DrawTexture(m_pLocalPlayerBlip, vecLocalPos.fX, vecLocalPos.fY, 1.0, 1.0, vecLocalRot.fZ, 0.5f, 0.5f); + g_pCore->GetGraphics()->DrawTexture(m_playerMarkerTexture, vecLocalPos.fX, vecLocalPos.fY, 1.0, 1.0, vecLocalRot.fZ, 0.5f, 0.5f); } // Update visibility of help text - bool bRequiredTextVisible = bIsRadarShowing && !m_bHideHelpText; + bool bRequiredTextVisible = isMapShowing && !m_bHideHelpText; if (bRequiredTextVisible != m_bTextVisible) { m_bTextVisible = bRequiredTextVisible; @@ -331,31 +397,31 @@ void CRadarMap::DoRender() } } -void CRadarMap::SetRadarEnabled(bool bIsRadarEnabled) +void CPlayerMap::SetPlayerMapEnabled(bool show) { - bool bAlreadyEnabled = (m_bIsRadarEnabled || m_bForcedState); - bool bWillShow = (bIsRadarEnabled || m_bForcedState); - if (bAlreadyEnabled != bWillShow) + bool alreadyEnabled = (m_bIsPlayerMapEnabled || m_bForcedState); + bool definitiveShow = (show || m_bForcedState); + if (alreadyEnabled != definitiveShow) { - InternalSetRadarEnabled(bWillShow); + InternalSetPlayerMapEnabled(definitiveShow); } - m_bIsRadarEnabled = bIsRadarEnabled; + m_bIsPlayerMapEnabled = show; } -void CRadarMap::SetForcedState(bool bState) +void CPlayerMap::SetForcedState(bool state) { - bool bAlreadyShowing = (m_bIsRadarEnabled || m_bForcedState); - bool bWillShow = (m_bIsRadarEnabled || bState); - if (bAlreadyShowing != bWillShow) + bool currState = (m_bIsPlayerMapEnabled || m_bForcedState); + bool definitiveState = (m_bIsPlayerMapEnabled || state); + if (currState != definitiveState) { - InternalSetRadarEnabled(bWillShow); + InternalSetPlayerMapEnabled(definitiveState); } - m_bForcedState = bState; + m_bForcedState = state; } -void CRadarMap::InternalSetRadarEnabled(bool bEnabled) +void CPlayerMap::InternalSetPlayerMapEnabled(bool enable) { - if (bEnabled) + if (enable) { m_bChatVisible = g_pCore->IsChatVisible(); m_bChatInputBlocked = g_pCore->IsChatInputBlocked(); @@ -375,7 +441,7 @@ void CRadarMap::InternalSetRadarEnabled(bool bEnabled) } } -bool CRadarMap::CalculateEntityOnScreenPosition(CClientEntity* pEntity, CVector2D& vecLocalPos) +bool CPlayerMap::CalculateEntityOnScreenPosition(CClientEntity* pEntity, CVector2D& vecLocalPos) { // If the entity exists if (pEntity) @@ -406,7 +472,7 @@ bool CRadarMap::CalculateEntityOnScreenPosition(CClientEntity* pEntity, CVector2 return false; } -bool CRadarMap::CalculateEntityOnScreenPosition(CVector vecPosition, CVector2D& vecLocalPos) +bool CPlayerMap::CalculateEntityOnScreenPosition(CVector vecPosition, CVector2D& vecLocalPos) { // Adjust to the map variables and create the map ratio float fX = vecPosition.fX + 3000.0f; @@ -428,7 +494,7 @@ bool CRadarMap::CalculateEntityOnScreenPosition(CVector vecPosition, CVector2D& return false; } -void CRadarMap::SetupMapVariables() +void CPlayerMap::SetupMapVariables() { // Calculate the map size and the middle of the screen coords m_fMapSize = static_cast(m_uiHeight * m_fZoom); @@ -524,7 +590,7 @@ void CRadarMap::SetupMapVariables() } } -void CRadarMap::ZoomIn() +void CPlayerMap::ZoomIn() { if (m_fZoom <= 4) { @@ -533,7 +599,7 @@ void CRadarMap::ZoomIn() } } -void CRadarMap::ZoomOut() +void CPlayerMap::ZoomOut() { if (m_fZoom >= 1) { @@ -559,7 +625,7 @@ void CRadarMap::ZoomOut() } } -void CRadarMap::MoveNorth() +void CPlayerMap::MoveNorth() { if (!m_bIsAttachedToLocal) { @@ -579,7 +645,7 @@ void CRadarMap::MoveNorth() } } -void CRadarMap::MoveSouth() +void CPlayerMap::MoveSouth() { if (!m_bIsAttachedToLocal) { @@ -599,7 +665,7 @@ void CRadarMap::MoveSouth() } } -void CRadarMap::MoveEast() +void CPlayerMap::MoveEast() { if (!m_bIsAttachedToLocal) { @@ -619,7 +685,7 @@ void CRadarMap::MoveEast() } } -void CRadarMap::MoveWest() +void CPlayerMap::MoveWest() { if (!m_bIsAttachedToLocal) { @@ -639,30 +705,26 @@ void CRadarMap::MoveWest() } } -void CRadarMap::SetAttachedToLocalPlayer(bool bIsAttachedToLocal) +void CPlayerMap::SetAttachedToLocalPlayer(bool bIsAttachedToLocal) { m_bIsAttachedToLocal = bIsAttachedToLocal; SetupMapVariables(); if (m_bIsAttachedToLocal) - { - m_HelpTextList[0]->SetCaption("Current Mode: Attached to local player"); - } + m_HelpTextList[0]->SetCaption(_("Following Player")); else - { - m_HelpTextList[0]->SetCaption("Current Mode: Free Move"); - } + m_HelpTextList[0]->SetCaption(_("Free Movement")); } -bool CRadarMap::IsRadarShowing() +bool CPlayerMap::IsPlayerMapShowing() { - return ((m_bIsRadarEnabled || m_bForcedState) && m_pRadarImage && m_pLocalPlayerBlip && (!g_pCore->GetConsole()->IsVisible() && !g_pCore->IsMenuVisible())); + return ((m_bIsPlayerMapEnabled || m_bForcedState) && m_mapImageTexture && m_playerMarkerTexture && (!g_pCore->GetConsole()->IsVisible() && !g_pCore->IsMenuVisible())); } -bool CRadarMap::GetBoundingBox(CVector& vecMin, CVector& vecMax) +bool CPlayerMap::GetBoundingBox(CVector& vecMin, CVector& vecMax) { - // If our radar image exists (Values are not calculated unless map is showing) - if (IsRadarShowing()) + // If our map image exists (Values are not calculated unless map is showing) + if (IsPlayerMapShowing()) { vecMin.fX = static_cast(m_iMapMinX); vecMin.fY = static_cast(m_iMapMinY); @@ -678,12 +740,12 @@ bool CRadarMap::GetBoundingBox(CVector& vecMin, CVector& vecMax) } } -void CRadarMap::ToggleHelpText() +void CPlayerMap::ToggleHelpText() { m_bHideHelpText = !m_bHideHelpText; } -SString CRadarMap::GetBoundKeyName(const SString& strCommand) +SString CPlayerMap::GetBoundKeyName(const SString& strCommand) { CCommandBind* pCommandBind = g_pCore->GetKeyBinds()->GetBindFromCommand(strCommand, 0, 0, 0, false, 0); if (!pCommandBind) diff --git a/Client/mods/deathmatch/logic/CRadarMap.h b/Client/mods/deathmatch/logic/CPlayerMap.h similarity index 77% rename from Client/mods/deathmatch/logic/CRadarMap.h rename to Client/mods/deathmatch/logic/CPlayerMap.h index a3dd8f0d51..0d6edebb6f 100644 --- a/Client/mods/deathmatch/logic/CRadarMap.h +++ b/Client/mods/deathmatch/logic/CPlayerMap.h @@ -2,8 +2,8 @@ * * PROJECT: Multi Theft Auto v1.0 * LICENSE: See LICENSE in the top level directory - * FILE: mods/deathmatch/logic/CRadarMap.h - * PURPOSE: Header for radar map class + * FILE: mods/deathmatch/logic/CPlayerMap.h + * PURPOSE: Header for player map class * * Multi Theft Auto is available from http://www.multitheftauto.com/ * @@ -16,19 +16,19 @@ #include #include -class CRadarMap +class CPlayerMap { public: - CRadarMap(class CClientManager* pManager); - virtual ~CRadarMap(); + CPlayerMap(class CClientManager* pManager); + virtual ~CPlayerMap(); void DoPulse(); void DoRender(); - bool IsRadarShowing(); + bool IsPlayerMapShowing(); - bool GetRadarEnabled() const { return m_bIsRadarEnabled; }; - void SetRadarEnabled(bool bIsRadarEnabled); + bool GetPlayerMapEnabled() const { return m_bIsPlayerMapEnabled; }; + void SetPlayerMapEnabled(bool bIsRadarEnabled); bool GetForcedState() const { return m_bForcedState; } void SetForcedState(bool bState); @@ -38,10 +38,14 @@ class CRadarMap void ToggleHelpText(); protected: - void InternalSetRadarEnabled(bool bEnabled); + void InternalSetPlayerMapEnabled(bool bEnabled); void CreateMarkerTextures(); CTextureItem* GetMarkerTexture(CClientRadarMarker* pMarker, float fLocalZ, float* pfScale, SColor* pColor); + void CreatePlayerBlipTexture(); + void CreateOrUpdateMapTexture(); + void UpdateOrRevertMapTexture(std::size_t imageIndex); + void CreateAllTextures(); public: bool IsAttachedToLocalPlayer() const { return m_bIsAttachedToLocal; }; @@ -79,9 +83,13 @@ class CRadarMap class CClientRadarMarkerManager* m_pRadarMarkerManager; class CClientRadarAreaManager* m_pRadarAreaManager; - CTextureItem* m_pRadarImage; - CTextureItem* m_pLocalPlayerBlip; - std::vector m_MarkerTextureList; + bool m_failedToLoadTextures; + + std::size_t m_playerMapImageIndex; + + CTextureItem* m_mapImageTexture; + CTextureItem* m_playerMarkerTexture; + std::vector m_markerTextureList; unsigned int m_uiHeight; unsigned int m_uiWidth; @@ -97,7 +105,7 @@ class CRadarMap float m_fZoom; - bool m_bIsRadarEnabled; + bool m_bIsPlayerMapEnabled; bool m_bForcedState; bool m_bIsAttachedToLocal; diff --git a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index da92891265..5612bd9976 100644 --- a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include using std::list; @@ -51,7 +51,7 @@ static CClientMarkerManager* m_pMarkerManager; static CClientPickupManager* m_pPickupManager; static CMovingObjectsManager* m_pMovingObjectsManager; static CBlendedWeather* m_pBlendedWeather; -static CRadarMap* m_pRadarMap; +static CPlayerMap* m_pPlayerMap; static CClientCamera* m_pCamera; static CClientExplosionManager* m_pExplosionManager; static CClientProjectileManager* m_pProjectileManager; @@ -88,7 +88,7 @@ CStaticFunctionDefinitions::CStaticFunctionDefinitions(CLuaManager* pLuaManager, m_pPickupManager = pManager->GetPickupManager(); m_pMovingObjectsManager = m_pClientGame->GetMovingObjectsManager(); m_pBlendedWeather = m_pClientGame->GetBlendedWeather(); - m_pRadarMap = m_pClientGame->GetRadarMap(); + m_pPlayerMap = m_pClientGame->GetPlayerMap(); m_pCamera = pManager->GetCamera(); m_pExplosionManager = pManager->GetExplosionManager(); m_pProjectileManager = pManager->GetProjectileManager(); @@ -7840,25 +7840,25 @@ bool CStaticFunctionDefinitions::SetWeaponClipAmmo(CClientWeapon* pWeapon, int i bool CStaticFunctionDefinitions::ForcePlayerMap(bool& bForced) { - m_pClientGame->GetRadarMap()->SetForcedState(bForced); + m_pClientGame->GetPlayerMap()->SetForcedState(bForced); return true; } bool CStaticFunctionDefinitions::IsPlayerMapForced(bool& bForced) { - bForced = m_pRadarMap->GetForcedState(); + bForced = m_pPlayerMap->GetForcedState(); return true; } bool CStaticFunctionDefinitions::IsPlayerMapVisible(bool& bVisible) { - bVisible = m_pRadarMap->IsRadarShowing(); + bVisible = m_pPlayerMap->IsPlayerMapShowing(); return true; } bool CStaticFunctionDefinitions::GetPlayerMapBoundingBox(CVector& vecMin, CVector& vecMax) { - if (m_pRadarMap->GetBoundingBox(vecMin, vecMax)) + if (m_pPlayerMap->GetBoundingBox(vecMin, vecMax)) { return true; } diff --git a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h index 2d1ce8c88a..188e249f2d 100644 --- a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h +++ b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h @@ -167,8 +167,10 @@ class CStaticFunctionDefinitions static bool SetPedCanBeKnockedOffBike(CClientEntity& Entity, bool bCanBeKnockedOffBike); static bool SetPedAnimation(CClientEntity& Entity, const SString& strBlockName, const char* szAnimName, int iTime, int iBlend, bool bLoop, bool bUpdatePosition, bool bInterruptable, bool bFreezeLastFrame); - static bool SetPedAnimationProgress(CClientEntity& Entity, const SString& strAnimName, float fProgress); - static bool SetPedAnimationSpeed(CClientEntity& Entity, const SString& strAnimName, float fSpeed); + + static bool SetPedAnimationProgress(CClientEntity& Entity, const SString& strAnimName, float fProgress); + static bool SetPedAnimationSpeed(CClientEntity& Entity, const SString& strAnimName, float fSpeed); + static bool SetPedMoveAnim(CClientEntity& Entity, unsigned int iMoveAnim); static bool AddPedClothes(CClientEntity& Entity, const char* szTexture, const char* szModel, unsigned char ucType); static bool RemovePedClothes(CClientEntity& Entity, unsigned char ucType); diff --git a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.Util.cpp b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.Util.cpp index 641a76b04b..978fb139e8 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.Util.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.Util.cpp @@ -12,27 +12,40 @@ int CLuaFunctionDefs::GetValidPedModels(lua_State* luaVM) { - int iIndex = 0; + bool includeCustom; + CScriptArgReader argStream(luaVM); + argStream.ReadBool(includeCustom, true); + + auto* modelManager = g_pClientGame->GetManager()->GetModelManager(); + + std::size_t index = 0; lua_newtable(luaVM); - // Gather GTASA default skins - for (int i = 0; i <= 312; i++) + // Gather default and possibly custom GTASA ped model IDs + for (std::size_t i = 0; i <= 312; i++) { if (CClientPlayerManager::IsValidModel(i)) { - lua_pushnumber(luaVM, ++iIndex); + // Skip custom skins if not requested + if (!includeCustom && modelManager->FindModelByID(i)) + continue; + + lua_pushnumber(luaVM, ++index); lua_pushnumber(luaVM, i); lua_settable(luaVM, -3); } } - // Gather our custom skin model IDs allocated with engineRequestModel - // (there might be some < 313 as well, and since we don't want duplicates, we start at 313, others are already included by the loop above) - for (const auto& model : m_pManager->GetModelManager()->GetModelsByType(eClientModelType::PED, 313)) + if (includeCustom) { - lua_pushnumber(luaVM, ++iIndex); - lua_pushnumber(luaVM, model->GetModelID()); - lua_settable(luaVM, -3); + // Gather the rest of custom skin model IDs allocated with engineRequestModel + // (there are usually some < 313 as well, and since we don't want duplicates, we start at 313, others are already included by the loop above) + for (const auto& model : m_pManager->GetModelManager()->GetModelsByType(eClientModelType::PED, 313)) + { + lua_pushnumber(luaVM, ++index); + lua_pushnumber(luaVM, model->GetModelID()); + lua_settable(luaVM, -3); + } } return 1; 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/CLuaPedDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp index 2c8741f4d7..f38096dcee 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp @@ -12,7 +12,9 @@ #include "StdInc.h" #include #include "lua/CLuaFunctionParser.h" -#include "CMatrix_Pad.h" +#include +#include +#include #define MIN_CLIENT_REQ_REMOVEPEDFROMVEHICLE_CLIENTSIDE "1.3.0-9.04482" #define MIN_CLIENT_REQ_WARPPEDINTOVEHICLE_CLIENTSIDE "1.3.0-9.04482" @@ -23,70 +25,26 @@ void CLuaPedDefs::LoadFunctions() {"createPed", CreatePed}, {"detonateSatchels", DetonateSatchels}, {"killPed", KillPed}, - {"resetPedVoice", ArgumentParser}, - {"getPedVoice", GetPedVoice}, + {"updateElementRpHAnim", ArgumentParser}, + {"addPedClothes", AddPedClothes}, + {"removePedClothes", RemovePedClothes}, + {"warpPedIntoVehicle", WarpPedIntoVehicle}, + {"removePedFromVehicle", RemovePedFromVehicle}, + {"givePedWeapon", GivePedWeapon}, + {"setPedVoice", SetPedVoice}, - {"getPedRotation", GetPedRotation}, - {"canPedBeKnockedOffBike", CanPedBeKnockedOffBike}, - {"getPedContactElement", GetPedContactElement}, - {"isPedInVehicle", IsPedInVehicle}, - {"doesPedHaveJetPack", DoesPedHaveJetPack}, - {"isPedWearingJetpack", DoesPedHaveJetPack}, // introduced in 1.5.5-9.13846 - {"isPedOnGround", IsPedOnGround}, - {"getPedTask", GetPedTask}, - {"getPedSimplestTask", GetPedSimplestTask}, - {"isPedDoingTask", IsPedDoingTask}, - {"getPedTarget", GetPedTarget}, - {"getPedTargetStart", GetPedTargetStart}, - {"getPedTargetEnd", GetPedTargetEnd}, - {"getPedTargetCollision", GetPedTargetCollision}, - {"getPedWeaponSlot", GetPedWeaponSlot}, - {"getPedWeapon", GetPedWeapon}, - {"getPedAmmoInClip", GetPedAmmoInClip}, - {"getPedTotalAmmo", GetPedTotalAmmo}, - {"getPedOccupiedVehicle", GetPedOccupiedVehicle}, - {"getPedOccupiedVehicleSeat", GetPedOccupiedVehicleSeat}, - {"getPedArmor", GetPedArmor}, - {"isPedChoking", IsPedChoking}, - {"isPedDucked", IsPedDucked}, - {"getPedStat", GetPedStat}, - {"getPedBonePosition", GetPedBonePosition}, {"setElementBonePosition", ArgumentParser}, {"setElementBoneRotation", ArgumentParser}, {"setElementBoneQuaternion", ArgumentParser}, - {"getElementBonePosition", ArgumentParser}, - {"getElementBoneRotation", ArgumentParser}, - {"getElementBoneQuaternion", ArgumentParser}, {"setElementBoneMatrix", ArgumentParser}, - {"getElementBoneMatrix", ArgumentParser}, - {"updateElementRpHAnim", ArgumentParser}, - {"getPedClothes", GetPedClothes}, - {"getPedControlState", GetPedControlState}, - {"getPedAnalogControlState", GetPedAnalogControlState}, - {"isPedDead", IsPedDead}, - - {"isPedDoingGangDriveby", IsPedDoingGangDriveby}, - {"getPedFightingStyle", GetPedFightingStyle}, - {"getPedAnimation", GetPedAnimation}, - {"getPedMoveState", GetPedMoveState}, - {"getPedWalkingStyle", GetPedMoveAnim}, - {"isPedHeadless", IsPedHeadless}, - {"isPedFrozen", IsPedFrozen}, - {"isPedFootBloodEnabled", IsPedFootBloodEnabled}, - {"getPedCameraRotation", GetPedCameraRotation}, - {"getPedOxygenLevel", GetPedOxygenLevel}, - {"isPedBleeding", ArgumentParser}, - - {"setPedWeaponSlot", SetPedWeaponSlot}, {"setPedRotation", SetPedRotation}, + {"setPedWeaponSlot", SetPedWeaponSlot}, {"setPedCanBeKnockedOffBike", SetPedCanBeKnockedOffBike}, {"setPedAnimation", SetPedAnimation}, {"setPedAnimationProgress", SetPedAnimationProgress}, {"setPedAnimationSpeed", SetPedAnimationSpeed}, {"setPedWalkingStyle", SetPedMoveAnim}, - {"addPedClothes", AddPedClothes}, - {"removePedClothes", RemovePedClothes}, {"setPedControlState", SetPedControlState}, {"setPedAnalogControlState", SetPedAnalogControlState}, {"setPedDoingGangDriveby", SetPedDoingGangDriveby}, @@ -98,15 +56,65 @@ void CLuaPedDefs::LoadFunctions() {"setPedCameraRotation", SetPedCameraRotation}, {"setPedAimTarget", SetPedAimTarget}, {"setPedStat", SetPedStat}, - {"warpPedIntoVehicle", WarpPedIntoVehicle}, - {"removePedFromVehicle", RemovePedFromVehicle}, {"setPedOxygenLevel", SetPedOxygenLevel}, {"setPedArmor", ArgumentParser}, - {"givePedWeapon", GivePedWeapon}, - {"isPedReloadingWeapon", IsPedReloadingWeapon}, {"setPedEnterVehicle", ArgumentParser}, {"setPedExitVehicle", ArgumentParser}, {"setPedBleeding", ArgumentParser}, + + {"getPedVoice", GetPedVoice}, + {"getElementBonePosition", ArgumentParser}, + {"getElementBoneRotation", ArgumentParser}, + {"getElementBoneQuaternion", ArgumentParser}, + {"getElementBoneMatrix", ArgumentParser}, + {"getPedRotation", GetPedRotation}, + {"getPedWeaponSlot", GetPedWeaponSlot}, + {"canPedBeKnockedOffBike", CanPedBeKnockedOffBike}, + {"getPedAnimation", GetPedAnimation}, + {"getPedAnimationProgress", ArgumentParser}, + {"getPedAnimationSpeed", ArgumentParser}, + {"getPedAnimationLength", ArgumentParser}, + {"getPedWalkingStyle", GetPedMoveAnim}, + {"getPedControlState", GetPedControlState}, + {"getPedAnalogControlState", GetPedAnalogControlState}, + {"isPedDoingGangDriveby", IsPedDoingGangDriveby}, + {"getPedFightingStyle", GetPedFightingStyle}, + + {"isPedHeadless", IsPedHeadless}, + {"isPedFrozen", IsPedFrozen}, + {"isPedFootBloodEnabled", IsPedFootBloodEnabled}, + {"getPedCameraRotation", GetPedCameraRotation}, + + {"getPedStat", GetPedStat}, + {"getPedOxygenLevel", GetPedOxygenLevel}, + {"getPedArmor", GetPedArmor}, + {"isPedBleeding", ArgumentParser}, + + {"getPedContactElement", GetPedContactElement}, + {"getPedTask", GetPedTask}, + {"getPedSimplestTask", GetPedSimplestTask}, + {"getPedTarget", GetPedTarget}, + {"getPedTargetStart", GetPedTargetStart}, + {"getPedTargetEnd", GetPedTargetEnd}, + {"getPedTargetCollision", GetPedTargetCollision}, + {"getPedWeapon", GetPedWeapon}, + {"getPedAmmoInClip", GetPedAmmoInClip}, + {"getPedTotalAmmo", GetPedTotalAmmo}, + {"getPedOccupiedVehicle", GetPedOccupiedVehicle}, + {"getPedOccupiedVehicleSeat", GetPedOccupiedVehicleSeat}, + {"getPedBonePosition", GetPedBonePosition}, + {"getPedClothes", GetPedClothes}, + {"getPedMoveState", GetPedMoveState}, + + {"doesPedHaveJetPack", DoesPedHaveJetPack}, + {"isPedInVehicle", IsPedInVehicle}, + {"isPedWearingJetpack", DoesPedHaveJetPack}, + {"isPedOnGround", IsPedOnGround}, + {"isPedDoingTask", IsPedDoingTask}, + {"isPedChoking", IsPedChoking}, + {"isPedDucked", IsPedDucked}, + {"isPedDead", IsPedDead}, + {"isPedReloadingWeapon", IsPedReloadingWeapon}, }; // Add functions @@ -2279,6 +2287,66 @@ int CLuaPedDefs::SetPedAnimationProgress(lua_State* luaVM) return 1; } +float CLuaPedDefs::GetPedAnimationProgress(CClientPed* ped) +{ + CTask* currentTask = ped->GetTaskManager()->GetActiveTask(); + std::int32_t type = currentTask->GetTaskType(); + + // check if animation (task type is 401) + if (type != 401) + return -1.0f; + + auto* animation = dynamic_cast(currentTask); + if (!animation) + return -1.0f; + + auto animAssociation = g_pGame->GetAnimManager()->RpAnimBlendClumpGetAssociation(ped->GetClump(), animation->GetAnimName()); + if (!animAssociation) + return -1.0f; + + return animAssociation->GetCurrentProgress() / animAssociation->GetLength(); +} + +float CLuaPedDefs::GetPedAnimationSpeed(CClientPed* ped) +{ + CTask* currentTask = ped->GetTaskManager()->GetActiveTask(); + std::int32_t type = currentTask->GetTaskType(); + + // check if animation (task type is 401) + if (type != 401) + return -1.0f; + + auto* animation = dynamic_cast(currentTask); + if (!animation) + return -1.0f; + + auto animAssociation = g_pGame->GetAnimManager()->RpAnimBlendClumpGetAssociation(ped->GetClump(), animation->GetAnimName()); + if (!animAssociation) + return -1.0f; + + return animAssociation->GetCurrentSpeed(); +} + +float CLuaPedDefs::GetPedAnimationLength(CClientPed* ped) +{ + CTask* currentTask = ped->GetTaskManager()->GetActiveTask(); + std::int32_t type = currentTask->GetTaskType(); + + // check if animation (task type is 401) + if (type != 401) + return -1.0f; + + auto* animation = dynamic_cast(currentTask); + if (!animation) + return -1.0f; + + auto animAssociation = g_pGame->GetAnimManager()->RpAnimBlendClumpGetAssociation(ped->GetClump(), animation->GetAnimName()); + if (!animAssociation) + return -1.0f; + + return animAssociation->GetLength(); +} + int CLuaPedDefs::SetPedAnimationSpeed(lua_State* luaVM) { CClientEntity* pEntity; diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h index 126c463af7..d97a484d8e 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h @@ -71,6 +71,9 @@ class CLuaPedDefs : public CLuaDefs LUA_DECLARE(IsPedDoingGangDriveby); LUA_DECLARE(GetPedFightingStyle); LUA_DECLARE(GetPedAnimation); + static float GetPedAnimationProgress(CClientPed* ped); + static float GetPedAnimationSpeed(CClientPed* ped); + static float GetPedAnimationLength(CClientPed* ped); LUA_DECLARE(GetPedMoveState); LUA_DECLARE(GetPedMoveAnim); LUA_DECLARE(IsPedHeadless); 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/mods/deathmatch/logic/rpc/CPlayerRPCs.cpp b/Client/mods/deathmatch/logic/rpc/CPlayerRPCs.cpp index e8cda43283..321c030652 100644 --- a/Client/mods/deathmatch/logic/rpc/CPlayerRPCs.cpp +++ b/Client/mods/deathmatch/logic/rpc/CPlayerRPCs.cpp @@ -60,7 +60,7 @@ void CPlayerRPCs::ForcePlayerMap(NetBitStreamInterface& bitStream) if (bitStream.Read(ucVisible)) { bool bVisible = (ucVisible == 1); - m_pClientGame->GetRadarMap()->SetForcedState(bVisible); + m_pClientGame->GetPlayerMap()->SetForcedState(bVisible); } } diff --git a/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp b/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp index d92ba4788b..fd305f6955 100644 --- a/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp +++ b/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp @@ -619,6 +619,8 @@ void CWorldRPCs::SetSyncIntervals(NetBitStreamInterface& bitStream) bitStream.Read(g_TickRateSettings.iObjectSync); bitStream.Read(g_TickRateSettings.iKeySyncRotation); bitStream.Read(g_TickRateSettings.iKeySyncAnalogMove); + bitStream.Read(g_TickRateSettings.iPedSyncerDistance); + bitStream.Read(g_TickRateSettings.iUnoccupiedVehicleSyncerDistance); } void CWorldRPCs::SetMoonSize(NetBitStreamInterface& bitStream) diff --git a/Client/multiplayer_sa/CMultiplayerSA.cpp b/Client/multiplayer_sa/CMultiplayerSA.cpp index 28d5b1f551..73c8fd9df4 100644 --- a/Client/multiplayer_sa/CMultiplayerSA.cpp +++ b/Client/multiplayer_sa/CMultiplayerSA.cpp @@ -1569,7 +1569,12 @@ void CMultiplayerSA::InitHooks() // Fix invisible vehicle windows when lights are on (#2936) MemPut(0x6E1425, 1); + // Allow alpha change for helicopter rotor (#523) + MemSet((void*)0x6C444B, 0x90, 6); + MemSet((void*)0x6C4453, 0x90, 0x68); + InitHooks_CrashFixHacks(); + InitHooks_DeviceSelection(); // Init our 1.3 hooks. Init_13(); @@ -1857,6 +1862,7 @@ void CMultiplayerSA::DisableCloseRangeDamage(bool bDisabled) MemPut(0x73BA00, 0x86); } } + bool CMultiplayerSA::GetInteriorSoundsEnabled() { return bInteriorSoundsEnabled; diff --git a/Client/multiplayer_sa/CMultiplayerSA.h b/Client/multiplayer_sa/CMultiplayerSA.h index 802b9b56ea..d97300e6a1 100644 --- a/Client/multiplayer_sa/CMultiplayerSA.h +++ b/Client/multiplayer_sa/CMultiplayerSA.h @@ -80,6 +80,7 @@ class CMultiplayerSA : public CMultiplayer void InitHooks_ProjectileCollisionFix(); void InitHooks_ObjectStreamerOptimization(); void InitHooks_Postprocess(); + void InitHooks_DeviceSelection(); CRemoteDataStorage* CreateRemoteDataStorage(); void DestroyRemoteDataStorage(CRemoteDataStorage* pData); void AddRemoteDataStorage(CPlayerPed* pPed, CRemoteDataStorage* pData); diff --git a/Client/multiplayer_sa/CMultiplayerSA_DeviceSelection.cpp b/Client/multiplayer_sa/CMultiplayerSA_DeviceSelection.cpp new file mode 100644 index 0000000000..586f387270 --- /dev/null +++ b/Client/multiplayer_sa/CMultiplayerSA_DeviceSelection.cpp @@ -0,0 +1,155 @@ +/***************************************************************************** + * + * PROJECT: Multi Theft Auto v1.0 + * LICENSE: See LICENSE in the top level directory + * FILE: multiplayer_sa/CMultiplayerSA_DeviceSelection.cpp + * + * Multi Theft Auto is available from http://www.multitheftauto.com/ + * + *****************************************************************************/ + +#include "StdInc.h" +#define FUNC_rwDeviceSystemRequest 0x7F2AB0 +#define FUNC_DialogFunc 0x745E50 +#define FUNC_RwEngineGetSubSystemInfo 0x7F2C30 +#define CLASS_RwGlobals 0xC97B24 +#define CLASS_IDirect3D9 0xC97C20 +#define NUM_DialogFuncStackPushAddress 0x746239 + +// This is copied from SilentPatch: +// https://github.com/CookiePLMonster/SilentPatch/blob/dev/SilentPatch/FriendlyMonitorNames.cpp +std::unordered_map GetFriendlyMonitorNamesForDevicePaths() +{ + std::unordered_map monitorNames; + + HMODULE user32Lib = LoadLibrary(TEXT("user32")); + if (!user32Lib) + return monitorNames; + + auto* getDisplayConfigBufferSizes = (decltype(GetDisplayConfigBufferSizes)*)GetProcAddress(user32Lib, "GetDisplayConfigBufferSizes"); + auto* queryDisplayConfig = (decltype(QueryDisplayConfig)*)GetProcAddress(user32Lib, "QueryDisplayConfig"); + auto* displayConfigGetDeviceInfo = (decltype(DisplayConfigGetDeviceInfo)*)GetProcAddress(user32Lib, "DisplayConfigGetDeviceInfo"); + if (!getDisplayConfigBufferSizes || !queryDisplayConfig || !displayConfigGetDeviceInfo) + { + FreeLibrary(user32Lib); + return monitorNames; + } + + UINT32 pathCount, modeCount; + std::unique_ptr paths; + std::unique_ptr modes; + + LONG result = ERROR_SUCCESS; + do + { + result = getDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS, &pathCount, &modeCount); + if (result != ERROR_SUCCESS) + { + break; + } + paths = std::make_unique(pathCount); + modes = std::make_unique(modeCount); + result = queryDisplayConfig(QDC_ONLY_ACTIVE_PATHS, &pathCount, paths.get(), &modeCount, modes.get(), nullptr); + } while (result == ERROR_INSUFFICIENT_BUFFER); + + if (result != ERROR_SUCCESS) + { + FreeLibrary(user32Lib); + return monitorNames; + } + + for (size_t i = 0; i < pathCount; i++) + { + DISPLAYCONFIG_TARGET_DEVICE_NAME targetName = {}; + targetName.header.adapterId = paths[i].targetInfo.adapterId; + targetName.header.id = paths[i].targetInfo.id; + targetName.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME; + targetName.header.size = sizeof(targetName); + const LONG targetNameResult = DisplayConfigGetDeviceInfo(&targetName.header); + + DISPLAYCONFIG_SOURCE_DEVICE_NAME sourceName = {}; + sourceName.header.adapterId = paths[i].sourceInfo.adapterId; + sourceName.header.id = paths[i].sourceInfo.id; + sourceName.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME; + sourceName.header.size = sizeof(sourceName); + const LONG sourceNameResult = DisplayConfigGetDeviceInfo(&sourceName.header); + if (targetNameResult == ERROR_SUCCESS && sourceNameResult == ERROR_SUCCESS && targetName.monitorFriendlyDeviceName[0] != '\0') + { + char gdiDeviceName[std::size(sourceName.viewGdiDeviceName)]; + char monitorFriendlyDeviceName[std::size(targetName.monitorFriendlyDeviceName)]; + WideCharToMultiByte(CP_ACP, 0, sourceName.viewGdiDeviceName, -1, gdiDeviceName, static_cast(std::size(gdiDeviceName)), nullptr, nullptr); + WideCharToMultiByte(CP_ACP, 0, targetName.monitorFriendlyDeviceName, -1, monitorFriendlyDeviceName, + static_cast(std::size(monitorFriendlyDeviceName)), nullptr, nullptr); + + monitorNames.try_emplace(gdiDeviceName, monitorFriendlyDeviceName); + } + } + + FreeLibrary(user32Lib); + return monitorNames; +} + +struct RwSubSystemInfo +{ + char name[80]; +}; + +using rwDeviceSystemRequest = RwSubSystemInfo*(__cdecl*)(RwDevice* device, std::int32_t requestId, RwSubSystemInfo* pOut, void* pInOut, std::int32_t numIn); +static RwSubSystemInfo* RwEngineGetSubSystemInfo_Hooked(RwSubSystemInfo* subSystemInfo, std::int32_t subSystemIndex) +{ + auto* rwGlobals = *(RwGlobals**)CLASS_RwGlobals; + auto* rwDeviceSystemRequestFunc = (rwDeviceSystemRequest)(FUNC_rwDeviceSystemRequest); + if (!rwDeviceSystemRequestFunc(&rwGlobals->dOpenDevice, 14, subSystemInfo, nullptr, subSystemIndex)) + return nullptr; + + auto* pDxDevice = *(IDirect3D9**)CLASS_IDirect3D9; + if (!pDxDevice) + return subSystemInfo; + + D3DADAPTER_IDENTIFIER9 identifier; + if (FAILED(pDxDevice->GetAdapterIdentifier(subSystemIndex, 0, &identifier))) + return subSystemInfo; + + static const auto friendlyNames = GetFriendlyMonitorNamesForDevicePaths(); + + // If we can't find the friendly name, either because it doesn't exist or we're on an ancient Windows, fall back to the device name + auto it = friendlyNames.find(identifier.DeviceName); + if (it != friendlyNames.end()) + { + strncpy_s(subSystemInfo->name, it->second.c_str(), _TRUNCATE); + } + else + { + strncpy_s(subSystemInfo->name, identifier.Description, _TRUNCATE); + } + + return subSystemInfo; +} + +INT_PTR CALLBACK CustomDlgProc(HWND window, UINT msg, WPARAM wParam, LPARAM lParam) +{ + auto* orgDialogFunc = (DLGPROC)FUNC_DialogFunc; + if (msg != WM_INITDIALOG) + return orgDialogFunc(window, msg, wParam, lParam); + + orgDialogFunc(window, msg, wParam, lParam); + + // Set Icon + HMODULE hGameModule = GetModuleHandle(nullptr); + SendMessage(window, WM_SETICON, ICON_SMALL, reinterpret_cast(LoadIcon(hGameModule, MAKEINTRESOURCE(100)))); + + // Make the dialog visible in the task bar + // https://stackoverflow.com/a/1462811 + SetWindowLongPtr(window, GWL_EXSTYLE, WS_EX_APPWINDOW); + ShowWindow(window, SW_HIDE); + ShowWindow(window, SW_SHOW); + return FALSE; +} + +void CMultiplayerSA::InitHooks_DeviceSelection() +{ + // 0x746239 -> Exact address where the original DialogFunc address is being pushed as an argument to DialogBoxParamA(), + // we're replacing it with out own proxy function + MemPut(NUM_DialogFuncStackPushAddress, (DLGPROC)&CustomDlgProc); + HookInstall(FUNC_RwEngineGetSubSystemInfo, (DWORD)RwEngineGetSubSystemInfo_Hooked, 6); +} 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/CAnimBlendAssociation.h b/Client/sdk/game/CAnimBlendAssociation.h index 8d3501027e..f99b8bc982 100644 --- a/Client/sdk/game/CAnimBlendAssociation.h +++ b/Client/sdk/game/CAnimBlendAssociation.h @@ -40,8 +40,10 @@ class CAnimBlendAssociation virtual float GetBlendAmount() = 0; virtual void SetBlendAmount(float fAmount) = 0; virtual void SetCurrentProgress(float fProgress) = 0; - virtual float GetCurrentSpeed() = 0; + virtual float GetCurrentProgress() const noexcept = 0; virtual void SetCurrentSpeed(float fSpeed) = 0; + virtual float GetCurrentSpeed() const noexcept = 0; + virtual float GetLength() const noexcept = 0; virtual void SetAnimID(short sAnimID) = 0; virtual void SetAnimGroup(short sAnimGroup) = 0; virtual void SetFlags(short sFlags) = 0; diff --git a/Client/sdk/game/CAnimBlendHierarchy.h b/Client/sdk/game/CAnimBlendHierarchy.h index 7780250968..42cd336554 100644 --- a/Client/sdk/game/CAnimBlendHierarchy.h +++ b/Client/sdk/game/CAnimBlendHierarchy.h @@ -27,6 +27,7 @@ class CAnimBlendHierarchy virtual void RemoveFromUncompressedCache() = 0; virtual void RemoveQuaternionFlips() = 0; virtual void CalculateTotalTime() = 0; + virtual float GetTotalTime() const noexcept = 0; virtual CAnimBlendSequenceSAInterface* GetSequence(DWORD dwIndex) = 0; virtual CAnimBlendSequenceSAInterface* GetSequences() = 0; virtual unsigned short GetNumSequences() = 0; diff --git a/Client/sdk/game/CGame.h b/Client/sdk/game/CGame.h index 2314fdad0e..06866e06ce 100644 --- a/Client/sdk/game/CGame.h +++ b/Client/sdk/game/CGame.h @@ -230,6 +230,9 @@ class __declspec(novtable) CGame virtual bool IsTunnelWeatherBlendEnabled() const noexcept = 0; virtual void SetTunnelWeatherBlendEnabled(bool isEnabled) = 0; + virtual bool IsIgnoreFireStateEnabled() const noexcept = 0; + virtual void SetIgnoreFireStateEnabled(bool isEnabled) = 0; + virtual CWeapon* CreateWeapon() = 0; virtual CWeaponStat* CreateWeaponStat(eWeaponType weaponType, eWeaponSkill weaponSkill) = 0; diff --git a/Client/sdk/game/CPools.h b/Client/sdk/game/CPools.h index a5250fb657..5b7dd0bd2b 100644 --- a/Client/sdk/game/CPools.h +++ b/Client/sdk/game/CPools.h @@ -14,6 +14,7 @@ #include "Common.h" #include "CBuildingsPool.h" #include "CDummyPool.h" +#include "CTxdPool.h" class CClientEntity; class CEntity; @@ -107,12 +108,7 @@ class CPools virtual void ResetPedPoolCount() = 0; virtual void InvalidateLocalPlayerClientEntity() = 0; - virtual uint AllocateTextureDictonarySlot(uint uiSlotID, std::string& strTxdName) = 0; - virtual void RemoveTextureDictonarySlot(uint uiTxdID) = 0; - virtual bool IsFreeTextureDictonarySlot(uint uiTxdID) = 0; - - virtual ushort GetFreeTextureDictonarySlot() = 0; - virtual CBuildingsPool& GetBuildingsPool() noexcept = 0; - virtual CDummyPool& GetDummyPool() noexcept = 0; + virtual CDummyPool& GetDummyPool() noexcept = 0; + virtual CTxdPool& GetTxdPool() 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/Client/sdk/game/CTxdPool.h b/Client/sdk/game/CTxdPool.h new file mode 100644 index 0000000000..1e4ff3493b --- /dev/null +++ b/Client/sdk/game/CTxdPool.h @@ -0,0 +1,22 @@ +/***************************************************************************** + * + * PROJECT: Multi Theft Auto + * LICENSE: See LICENSE in the top level directory + * + * Multi Theft Auto is available from https://www.multitheftauto.com/ + * + *****************************************************************************/ + +#pragma once + +#include "Common.h" + +class CTxdPool +{ +public: + virtual std::uint32_t AllocateTextureDictonarySlot(std::uint32_t uiSlotID, std::string& strTxdName) = 0; + virtual void RemoveTextureDictonarySlot(std::uint32_t uiTxdID) = 0; + virtual bool IsFreeTextureDictonarySlot(std::uint32_t uiTxdID) = 0; + + virtual std::uint16_t GetFreeTextureDictonarySlot() = 0; +}; diff --git a/Client/sdk/game/RenderWare.h b/Client/sdk/game/RenderWare.h index 20249e01fd..d85011b291 100644 --- a/Client/sdk/game/RenderWare.h +++ b/Client/sdk/game/RenderWare.h @@ -526,3 +526,49 @@ struct RwError { int err1, err2; }; + +/*****************************************************************************/ +/** RenderWare Globals **/ +/*****************************************************************************/ + +typedef bool (*RwSystemFunc)(std::int32_t, void*, void*, std::int32_t); +struct RwDevice +{ + float gammaCorrection; + RwSystemFunc fpSystem; + float zBufferNear; + float zBufferFar; + // RwRenderStateSetFunction fpRenderStateSet; + // RwRenderStateGetFunction fpRenderStateGet; + // RwIm2DRenderLineFunction fpIm2DRenderLine; + // RwIm2DRenderTriangleFunction fpIm2DRenderTriangle; + // RwIm2DRenderPrimitiveFunction fpIm2DRenderPrimitive; + // RwIm2DRenderIndexedPrimitiveFunction fpIm2DRenderIndexedPrimitive; + // RwIm3DRenderLineFunction fpIm3DRenderLine; + // RwIm3DRenderTriangleFunction fpIm3DRenderTriangle; + // RwIm3DRenderPrimitiveFunction fpIm3DRenderPrimitive; + // RwIm3DRenderIndexedPrimitiveFunction fpIm3DRenderIndexedPrimitive; +}; +// static_assert(sizeof(RwDevice) == 0x38, "Incorrect class size: RwDevice"); + +typedef bool (*RwStandardFunc)(void*, void*, std::int32_t); +struct RwGlobals +{ + void* curCamera; + void* curWorld; + std::uint16_t renderFrame; + std::uint16_t lightFrame; + std::uint16_t pad[2]; + RwDevice dOpenDevice; + RwStandardFunc stdFunc[29]; + // RwLinkList dirtyFrameList; + // RwFileFunctions fileFuncs; + // RwStringFunctions stringFuncs; + // RwMemoryFunctions memoryFuncs; + // RwMemoryAllocFn memoryAlloc; + // RwMemoryFreeFn memoryFree; + // RwMetrics* metrics; + // RwEngineStatus engineStatus; + // RwUInt32 resArenaInitSize; +}; +//static_assert(sizeof(RwGlobals) == 0x158, "Incorrect class size: RwGlobals"); diff --git a/Client/sdk/game/Task.h b/Client/sdk/game/Task.h index a991ad9c98..98cd45b382 100644 --- a/Client/sdk/game/Task.h +++ b/Client/sdk/game/Task.h @@ -33,7 +33,8 @@ class CTask virtual void StopTimer(const CEvent* pEvent) = 0; virtual bool MakeAbortable(CPed* pPed, const int iPriority, const CEvent* pEvent) = 0; virtual const char* GetTaskName() = 0; - virtual class CTaskSAInterface* GetInterface() = 0; + virtual class CTaskSAInterface* GetInterface() noexcept = 0; + virtual const class CTaskSAInterface* GetInterface() const noexcept = 0; virtual bool IsValid() = 0; virtual void SetAsPedTask(CPed* pPed, const int iTaskPriority, const bool bForceNewTask = false) = 0; virtual void SetAsSecondaryPedTask(CPed* pPed, const int iType) = 0; diff --git a/Client/sdk/game/TaskBasic.h b/Client/sdk/game/TaskBasic.h index 29d1db780d..8227dcf1f9 100644 --- a/Client/sdk/game/TaskBasic.h +++ b/Client/sdk/game/TaskBasic.h @@ -34,7 +34,8 @@ class CTaskSimpleRunAnim : public virtual CTaskSimpleAnim class CTaskSimpleRunNamedAnim : public virtual CTaskSimpleAnim { public: - virtual ~CTaskSimpleRunNamedAnim(){}; + virtual const char* GetAnimName() const noexcept = 0; + virtual const char* GetGroupName() const noexcept = 0; }; class CTaskComplexDie : public virtual CTaskComplex diff --git a/Client/sdk/net/CNet.h b/Client/sdk/net/CNet.h index 36824b6ab3..cb38718f47 100644 --- a/Client/sdk/net/CNet.h +++ b/Client/sdk/net/CNet.h @@ -115,7 +115,7 @@ class CNet virtual const char* GetNextBuffer() = 0; virtual const char* GetDiagnosticStatus() = 0; - virtual void UpdatePingStatus(const char* szStatus, ushort& usDataRef) = 0; + virtual void UpdatePingStatus(const char* szStatus, ushort& usDataRef, bool& isVerified) = 0; virtual bool VerifySignature(const char* pData, unsigned long ulSize) = 0; diff --git a/Server/mods/deathmatch/StdInc.h b/Server/mods/deathmatch/StdInc.h index c2e6355739..fb397aad5b 100644 --- a/Server/mods/deathmatch/StdInc.h +++ b/Server/mods/deathmatch/StdInc.h @@ -49,6 +49,7 @@ #include #include #include +#include "version.h" extern class CNetServer* g_pRealNetServer; extern class CGame* g_pGame; diff --git a/Server/mods/deathmatch/editor.conf b/Server/mods/deathmatch/editor.conf index f72486a6cb..1355e673ee 100644 --- a/Server/mods/deathmatch/editor.conf +++ b/Server/mods/deathmatch/editor.conf @@ -263,6 +263,16 @@ *NOTE* This only protects resources which use dbConnect with mysql Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + + 1 + + + 1 diff --git a/Server/mods/deathmatch/local.conf b/Server/mods/deathmatch/local.conf index ec3defd37d..d30a608781 100644 --- a/Server/mods/deathmatch/local.conf +++ b/Server/mods/deathmatch/local.conf @@ -263,6 +263,22 @@ *NOTE* This only protects resources which use dbConnect with mysql Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + + 1 + + + 0 + + + 1 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 9640f6e75b..a036f2f9d1 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..98ea8250b2 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 @@ -257,6 +258,7 @@ CGame::CGame() : m_FloodProtect(4, 30000, 30000) // Max of 4 connecti m_WorldSpecialProps[WorldSpecialProperty::EXTENDEDWATERCANNONS] = true; m_WorldSpecialProps[WorldSpecialProperty::ROADSIGNSTEXT] = true; m_WorldSpecialProps[WorldSpecialProperty::TUNNELWEATHERBLEND] = true; + m_WorldSpecialProps[WorldSpecialProperty::IGNOREFIRESTATE] = false; m_JetpackWeapons[WEAPONTYPE_MICRO_UZI] = true; m_JetpackWeapons[WEAPONTYPE_TEC9] = true; @@ -1606,6 +1608,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 +1786,36 @@ 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 if another player is using the same serial + if (m_pMainConfig->IsCheckDuplicateSerialsEnabled() && m_pPlayerManager->GetBySerial(strSerial)) + { + // Tell the console + CLogger::LogPrintf("CONNECT: %s failed to connect (Serial already in use) (%s)\n", szNick, strIPAndSerial.c_str()); + + // Tell the player the problem + if (pPlayer->CanBitStream(eBitStreamVersion::CheckDuplicateSerials)) + DisconnectPlayer(this, *pPlayer, CPlayerDisconnectedPacket::SERIAL_DUPLICATE); + else + DisconnectPlayer(this, *pPlayer, CPlayerDisconnectedPacket::KICK); + + 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 +2669,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..49c73419ca 100644 --- a/Server/mods/deathmatch/logic/CMainConfig.cpp +++ b/Server/mods/deathmatch/logic/CMainConfig.cpp @@ -79,6 +79,8 @@ CMainConfig::CMainConfig(CConsole* pConsole) : CXMLConfig(NULL) m_iBackupInterval = 3; m_iBackupAmount = 5; m_bSyncMapElementData = true; + m_elementDataWhitelisted = false; + m_checkDuplicateSerials = true; } bool CMainConfig::Load() @@ -133,6 +135,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 +528,9 @@ bool CMainConfig::Load() g_TickRateSettings.iLightSync = Clamp(200, g_TickRateSettings.iLightSync, 4000); } + GetBoolean(m_pRootNode, "elementdata_whitelisted", m_elementDataWhitelisted); + GetBoolean(m_pRootNode, "check_duplicate_serials", m_checkDuplicateSerials); + ApplyNetOptions(); return true; @@ -1465,6 +1473,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..05df0e2f32 100644 --- a/Server/mods/deathmatch/logic/CMainConfig.h +++ b/Server/mods/deathmatch/logic/CMainConfig.h @@ -126,6 +126,9 @@ 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 IsCheckDuplicateSerialsEnabled() const noexcept { return m_checkDuplicateSerials; } + bool IsCheckResourceClientFilesEnabled() const noexcept { return m_checkResourceClientFiles != 0; } SString GetSetting(const SString& configSetting); bool GetSetting(const SString& configSetting, SString& strValue); @@ -227,4 +230,7 @@ class CMainConfig : public CXMLConfig int m_bFakeLagCommandEnabled; int m_iPlayerTriggeredEventIntervalMs; int m_iMaxPlayerTriggeredEventsPerInterval; + bool m_elementDataWhitelisted; + bool m_checkDuplicateSerials; + int m_checkResourceClientFiles; }; diff --git a/Server/mods/deathmatch/logic/CPlayerManager.cpp b/Server/mods/deathmatch/logic/CPlayerManager.cpp index abdf923df7..227d3677f2 100644 --- a/Server/mods/deathmatch/logic/CPlayerManager.cpp +++ b/Server/mods/deathmatch/logic/CPlayerManager.cpp @@ -138,6 +138,17 @@ CPlayer* CPlayerManager::Get(const char* szNick, bool bCaseSensitive) return NULL; } +CPlayer* CPlayerManager::GetBySerial(const std::string_view serial) const noexcept +{ + for (const auto& player : m_Players) + { + if (player->GetSerial() == serial) + return player; + } + + return nullptr; +} + void CPlayerManager::DeleteAll() { // Delete all the items in the list diff --git a/Server/mods/deathmatch/logic/CPlayerManager.h b/Server/mods/deathmatch/logic/CPlayerManager.h index bd503380f4..0380c4bce4 100644 --- a/Server/mods/deathmatch/logic/CPlayerManager.h +++ b/Server/mods/deathmatch/logic/CPlayerManager.h @@ -40,6 +40,7 @@ class CPlayerManager CPlayer* Get(const NetServerPlayerID& PlayerSocket); CPlayer* Get(const char* szNick, bool bCaseSensitive = false); + CPlayer* GetBySerial(const std::string_view serial) const noexcept; std::list::const_iterator IterBegin() { return m_Players.begin(); }; std::list::const_iterator IterEnd() { return m_Players.end(); }; diff --git a/Server/mods/deathmatch/logic/CResource.cpp b/Server/mods/deathmatch/logic/CResource.cpp index 3dcf147c39..279f1937a7 100644 --- a/Server/mods/deathmatch/logic/CResource.cpp +++ b/Server/mods/deathmatch/logic/CResource.cpp @@ -35,6 +35,7 @@ #include #include #include +#include "CStaticFunctionDefinitions.h" #ifdef WIN32 #include @@ -1465,44 +1466,55 @@ bool CResource::ReadIncludedHTML(CXMLNode* pRoot) if (!strFilename.empty()) { - std::string strFullFilename; ReplaceSlashes(strFilename); - if (IsFilenameUsed(strFilename, false)) + if (!IsValidFilePath(strFilename.c_str())) { - CLogger::LogPrintf("WARNING: Duplicate html file in resource '%s': '%s'\n", m_strResourceName.c_str(), strFilename.c_str()); + m_strFailureReason = SString("Couldn't find html %s for resource %s\n", strFilename.c_str(), m_strResourceName.c_str()); + CLogger::ErrorPrintf(m_strFailureReason); + return false; } - // Try to find the file - if (IsValidFilePath(strFilename.c_str()) && GetFilePath(strFilename.c_str(), strFullFilename)) + std::vector vecFiles = GetFilePaths(strFilename.c_str()); + if (vecFiles.empty()) { - // This one is supposed to be default, but there's already a default page - if (bFoundDefault && bIsDefault) + if (glob::has_magic(strFilename)) { - CLogger::LogPrintf("Only one html item can be default per resource, ignoring %s in %s\n", strFilename.c_str(), - m_strResourceName.c_str()); - bIsDefault = false; + m_ResourceFilesCountPerDir[strFilename] = vecFiles.size(); + continue; } - // If this is supposed to be default, we've now found our default page - if (bIsDefault) - bFoundDefault = true; - - // Create a new resource HTML file and add it to the list - auto pResourceFile = new CResourceHTMLItem(this, strFilename.c_str(), strFullFilename.c_str(), &Attributes, bIsDefault, bIsRaw, - bIsRestricted, m_bOOPEnabledInMetaXml); - m_ResourceFiles.push_back(pResourceFile); - - // This is the first HTML file? Remember it - if (!pFirstHTML) - pFirstHTML = pResourceFile; - } - else - { m_strFailureReason = SString("Couldn't find html %s for resource %s\n", strFilename.c_str(), m_strResourceName.c_str()); CLogger::ErrorPrintf(m_strFailureReason); return false; } + + for (const std::string& strFilePath : vecFiles) + { + std::string strFullFilename; + + if (GetFilePath(strFilePath.c_str(), strFullFilename)) + { + // This one is supposed to be default, but there's already a default page + if (bFoundDefault && bIsDefault) + { + CLogger::LogPrintf("Only one html item can be default per resource, ignoring %s in %s\n", strFilename.c_str(), m_strResourceName.c_str()); + bIsDefault = false; + } + + // If this is supposed to be default, we've now found our default page + if (bIsDefault) + bFoundDefault = true; + + // Create a new resource HTML file and add it to the list + auto pResourceFile = new CResourceHTMLItem(this, strFilename.c_str(), strFullFilename.c_str(), &Attributes, bIsDefault, bIsRaw, bIsRestricted, m_bOOPEnabledInMetaXml); + m_ResourceFiles.push_back(pResourceFile); + + // This is the first HTML file? Remember it + if (!pFirstHTML) + pFirstHTML = pResourceFile; + } + } } else { diff --git a/Server/mods/deathmatch/logic/CResourceChecker.Data.h b/Server/mods/deathmatch/logic/CResourceChecker.Data.h index d57087d34d..4446fdc5d9 100644 --- a/Server/mods/deathmatch/logic/CResourceChecker.Data.h +++ b/Server/mods/deathmatch/logic/CResourceChecker.Data.h @@ -167,10 +167,11 @@ namespace //{false, "doesPedHaveJetPack", "isPedWearingJetpack"}, // Base Encoding & Decoding - {false, "base64Encode", "encodeString"}, - {false, "base64Decode", "decodeString"}, + {true, "base64Encode", "Please manually change this to encodeString (different syntax). Refer to the wiki for details"}, + {true, "base64Decode", "Please manually change this to decodeString (different syntax). Refer to the wiki for details"}, {false, "setHelicopterRotorSpeed", "setVehicleRotorSpeed"}, + {false, "getHelicopterRotorSpeed", "getVehicleRotorSpeed"}, {false, "setPedOnFire", "setElementOnFire"}, {false, "isPedOnFire", "isElementOnFire"} @@ -249,6 +250,7 @@ namespace {false, "getPlayerOccupiedVehicleSeat", "getPedOccupiedVehicleSeat"}, {false, "isPlayerInVehicle", "isPedInVehicle"}, {false, "getPlayerFromNick", "getPlayerFromName"}, + // Client {false, "getClientName", "getPlayerName"}, {false, "getClientIP", "getPlayerIP"}, @@ -274,9 +276,10 @@ namespace {true, "setPlayerDiscordJoinParams", "See GitHub PR #2499 for more details"}, // Base Encoding & Decoding - {false, "base64Encode", "encodeString"}, - {false, "base64Decode", "decodeString"}, - + {true, "base64Encode", "Please manually change this to encodeString (different syntax). Refer to the wiki for details"}, + {true, "base64Decode", "Please manually change this to decodeString (different syntax). Refer to the wiki for details"} + + // Ped {false, "setPedOnFire", "setElementOnFire"}, {false, "isPedOnFire", "isElementOnFire"} }; diff --git a/Server/mods/deathmatch/logic/CResourceChecker.cpp b/Server/mods/deathmatch/logic/CResourceChecker.cpp index db2909cb1c..9998b089ca 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; @@ -361,16 +367,25 @@ void CResourceChecker::CheckMetaSourceForIssues(CXMLNode* pRootNode, const strin attributes.Delete("client"); attributes.Delete("both"); - if (!m_strReqServerVersion.empty()) + // Use "both" if client and server versions are the same + if (!m_strReqServerVersion.empty() && !m_strReqClientVersion.empty() && m_strReqServerVersion == m_strReqClientVersion) { - CXMLAttribute* pAttr = attributes.Create("server"); + CXMLAttribute* pAttr = attributes.Create("both"); pAttr->SetValue(m_strReqServerVersion); } - - if (!m_strReqClientVersion.empty()) + else { - CXMLAttribute* pAttr = attributes.Create("client"); - pAttr->SetValue(m_strReqClientVersion); + if (!m_strReqServerVersion.empty()) + { + CXMLAttribute* pAttr = attributes.Create("server"); + pAttr->SetValue(m_strReqServerVersion); + } + + if (!m_strReqClientVersion.empty()) + { + CXMLAttribute* pAttr = attributes.Create("client"); + pAttr->SetValue(m_strReqClientVersion); + } } if (pbOutHasChanged) diff --git a/Server/mods/deathmatch/logic/CResourceChecker.h b/Server/mods/deathmatch/logic/CResourceChecker.h index 50c7ec00bb..ea9e7a1be9 100644 --- a/Server/mods/deathmatch/logic/CResourceChecker.h +++ b/Server/mods/deathmatch/logic/CResourceChecker.h @@ -2,7 +2,7 @@ * * PROJECT: Multi Theft Auto v1.0 * LICENSE: See LICENSE in the top level directory - * FILE: mods/deathmatch/logic/CResourceChecker.cpp + * FILE: mods/deathmatch/logic/CResourceChecker.h * PURPOSE: Resource file content checker/validator/upgrader * * Multi Theft Auto is available from http://www.multitheftauto.com/ diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index 0662fc5208..1554164c00 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -971,14 +971,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) { @@ -10873,6 +10878,8 @@ bool CStaticFunctionDefinitions::SendSyncIntervals(CPlayer* pPlayer) BitStream.pBitStream->Write(g_TickRateSettings.iObjectSync); BitStream.pBitStream->Write(g_TickRateSettings.iKeySyncRotation); BitStream.pBitStream->Write(g_TickRateSettings.iKeySyncAnalogMove); + BitStream.pBitStream->Write(g_TickRateSettings.iPedSyncerDistance); + BitStream.pBitStream->Write(g_TickRateSettings.iUnoccupiedVehicleSyncerDistance); if (pPlayer) pPlayer->Send(CLuaPacket(SET_SYNC_INTERVALS, *BitStream.pBitStream)); else diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h index 41a4d6de24..642bbc5b50 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 f4b8f5aa13..6a5afcad58 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp +++ b/Server/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp @@ -1543,6 +1543,7 @@ int CLuaElementDefs::setElementData(lua_State* luaVM) SString strKey; CLuaArgument value; ESyncType syncType = ESyncType::BROADCAST; + std::optional clientTrust{}; CScriptArgReader argStream(luaVM); argStream.ReadUserData(pElement); @@ -1559,6 +1560,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); @@ -1571,7 +1579,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/logic/packets/CMapInfoPacket.cpp b/Server/mods/deathmatch/logic/packets/CMapInfoPacket.cpp index e62547b3fb..e2adf9a5bc 100644 --- a/Server/mods/deathmatch/logic/packets/CMapInfoPacket.cpp +++ b/Server/mods/deathmatch/logic/packets/CMapInfoPacket.cpp @@ -192,6 +192,7 @@ bool CMapInfoPacket::Write(NetBitStreamInterface& BitStream) const wsProps.data3.roadsignstext = g_pGame->IsWorldSpecialPropertyEnabled(WorldSpecialProperty::ROADSIGNSTEXT); wsProps.data4.extendedwatercannons = g_pGame->IsWorldSpecialPropertyEnabled(WorldSpecialProperty::EXTENDEDWATERCANNONS); wsProps.data5.tunnelweatherblend = g_pGame->IsWorldSpecialPropertyEnabled(WorldSpecialProperty::TUNNELWEATHERBLEND); + wsProps.data6.ignoreFireState = g_pGame->IsWorldSpecialPropertyEnabled(WorldSpecialProperty::IGNOREFIRESTATE); BitStream.Write(&wsProps); } diff --git a/Server/mods/deathmatch/logic/packets/CPlayerDisconnectedPacket.h b/Server/mods/deathmatch/logic/packets/CPlayerDisconnectedPacket.h index 82fdfbd1b0..541f9b191c 100644 --- a/Server/mods/deathmatch/logic/packets/CPlayerDisconnectedPacket.h +++ b/Server/mods/deathmatch/logic/packets/CPlayerDisconnectedPacket.h @@ -39,7 +39,8 @@ class CPlayerDisconnectedPacket final : public CPacket BAN, KICK, CUSTOM, - SHUTDOWN + SHUTDOWN, + SERIAL_DUPLICATE }; CPlayerDisconnectedPacket(const char* szReason); diff --git a/Server/mods/deathmatch/mtaserver.conf b/Server/mods/deathmatch/mtaserver.conf index 19fe4a05d8..726199d548 100644 --- a/Server/mods/deathmatch/mtaserver.conf +++ b/Server/mods/deathmatch/mtaserver.conf @@ -268,12 +268,28 @@ Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + 0 + + + 1 + 1000 100 + + + 1 diff --git a/Server/mods/deathmatch/mtaserver.conf.template b/Server/mods/deathmatch/mtaserver.conf.template index faf1c71a6d..13237b1b10 100644 --- a/Server/mods/deathmatch/mtaserver.conf.template +++ b/Server/mods/deathmatch/mtaserver.conf.template @@ -269,10 +269,26 @@ Values: 0 - Off, 1 - Enabled. Default - 1 --> 1 + + 0 + + + 1 + 1000 100 + + + 1 diff --git a/Shared/data/MTA San Andreas/MTA/cgui/images/map_1024.png b/Shared/data/MTA San Andreas/MTA/cgui/images/map_1024.png new file mode 100644 index 0000000000..747e6d6d49 Binary files /dev/null and b/Shared/data/MTA San Andreas/MTA/cgui/images/map_1024.png differ diff --git a/Shared/data/MTA San Andreas/MTA/cgui/images/map_2048.png b/Shared/data/MTA San Andreas/MTA/cgui/images/map_2048.png new file mode 100644 index 0000000000..c41bfbb347 Binary files /dev/null and b/Shared/data/MTA San Andreas/MTA/cgui/images/map_2048.png differ diff --git a/Shared/data/MTA San Andreas/MTA/cgui/images/radar.jpg b/Shared/data/MTA San Andreas/MTA/cgui/images/radar.jpg deleted file mode 100644 index 4249b8943f..0000000000 Binary files a/Shared/data/MTA San Andreas/MTA/cgui/images/radar.jpg and /dev/null differ 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 b19c565c3c..2bfd95eb7c 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-09-27 04:28+0000\n" +"POT-Creation-Date: 2024-11-21 22:47+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,19 +18,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: Client/game_sa/CSettingsSA.cpp:767 -msgid "Can't find valid screen resolution." -msgstr "" - -#. Confirm that res should be used -#: Client/game_sa/CSettingsSA.cpp:843 -msgid "Are you sure you want to use this screen resolution?" -msgstr "" - -#: Client/game_sa/CSettingsSA.cpp:845 Client/loader/Dialogs.cpp:194 -msgid "MTA: San Andreas" -msgstr "" - #: Client/cefweb/CWebsiteRequests.cpp:19 msgid "Website requests" msgstr "" @@ -48,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:991 msgid "Allow" msgstr "" @@ -56,11 +43,6 @@ msgstr "" msgid "Deny" msgstr "" -#. Couldn't create render target for CPostEffects -#: Client/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp:1450 -msgid "Problem with graphics driver" -msgstr "" - #: Client/mods/deathmatch/CClient.cpp:36 msgid "This version has expired." msgstr "" @@ -103,47 +85,47 @@ msgid "previous radio channel" msgstr "" #: Client/mods/deathmatch/CClient.cpp:67 -msgid "enables the radar view" +msgid "enables the player-map view" msgstr "" #: Client/mods/deathmatch/CClient.cpp:68 -msgid "zooms the radar in" +msgid "zooms the player-map in" msgstr "" #: Client/mods/deathmatch/CClient.cpp:69 -msgid "zooms the radar out" +msgid "zooms the player-map out" msgstr "" #: Client/mods/deathmatch/CClient.cpp:70 -msgid "moves the radar north" +msgid "moves the player-map north" msgstr "" #: Client/mods/deathmatch/CClient.cpp:71 -msgid "moves the radar south" +msgid "moves the player-map south" msgstr "" #: Client/mods/deathmatch/CClient.cpp:72 -msgid "moves the radar east" +msgid "moves the player-map east" msgstr "" #: Client/mods/deathmatch/CClient.cpp:73 -msgid "moves the radar west" +msgid "moves the player-map west" msgstr "" #: Client/mods/deathmatch/CClient.cpp:74 -msgid "attaches the radar" +msgid "attaches the player-map" msgstr "" #: Client/mods/deathmatch/CClient.cpp:75 -msgid "reduces radar opacity" +msgid "reduces player-map opacity" msgstr "" #: Client/mods/deathmatch/CClient.cpp:76 -msgid "increases radar opacity" +msgid "increases player-map opacity" msgstr "" #: Client/mods/deathmatch/CClient.cpp:77 -msgid "toggles radar help text" +msgid "toggles player-map help text" msgstr "" #: Client/mods/deathmatch/CClient.cpp:78 @@ -176,500 +158,542 @@ msgstr "" msgid "(Development mode) prints world sound ids into the debug window" msgstr "" -#. Throw the error and disconnect -#: Client/mods/deathmatch/logic/CResourceFileDownloadManager.cpp:141 -#, c-format -msgid "Download error: %s" +#: Client/mods/deathmatch/logic/CResource.cpp:375 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1090 Client/core/CCore.cpp:674 +#: Client/core/CSettings.cpp:3510 +msgid "In-game" msgstr "" -#. Show timeout message and disconnect -#. Display an error, reset the error status and exit -#. Show a message that the connection timed out and abort -#. Show failed message and abort the attempt -#: Client/mods/deathmatch/logic/CResourceFileDownloadManager.cpp:145 -#: Client/mods/deathmatch/logic/CClientGame.cpp:641 -#: Client/mods/deathmatch/logic/CClientGame.cpp:715 -#: Client/mods/deathmatch/logic/CClientGame.cpp:739 -#: Client/mods/deathmatch/logic/CClientGame.cpp:761 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1174 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1254 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1264 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1333 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1370 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1419 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1431 -#: Client/core/CSettings.cpp:2941 Client/core/CSettings.cpp:4166 -#: Client/core/CSettings.cpp:4194 Client/core/CSettings.cpp:4764 -#: Client/core/CCore.cpp:1275 Client/core/CCore.cpp:1288 -#: 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 Client/core/CConnectManager.cpp:421 -#: Client/core/CGUI.cpp:87 Client/core/ServerBrowser/CServerBrowser.cpp:1278 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1300 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1357 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1406 -#: Client/core/DXHook/CDirect3DHook9.cpp:127 -#: 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 -#: Shared/mods/deathmatch/logic/CLatentTransferManager.cpp:378 -#: Shared/sdk/SharedUtil.Misc.hpp:137 -msgid "Error" +#: Client/mods/deathmatch/logic/CClientGame.cpp:375 +msgid "Flying a UFO around" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:506 -msgid "Disconnected: Invalid nickname" +#: Client/mods/deathmatch/logic/CClientGame.cpp:375 +msgid "Cruising around" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:510 -msgid "Disconnect from server" +#: Client/mods/deathmatch/logic/CClientGame.cpp:375 +msgid "Riding the waves of" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:514 -#, c-format -msgid "" -"Disconnected: Serial is banned.\n" -"Reason: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:376 +msgid "Riding the train in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:520 -#, c-format -msgid "" -"Disconnected: You are banned.\n" -"Reason: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:376 +msgid "Flying around" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:526 -#, c-format -msgid "" -"Disconnected: Account is banned.\n" -"Reason: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:377 +msgid "Riding around" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:531 -msgid "Disconnected: Version mismatch" +#: Client/mods/deathmatch/logic/CClientGame.cpp:377 +msgid "Monster truckin' around" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:535 -msgid "Disconnected: Join flood. Please wait a minute, then reconnect." +#: Client/mods/deathmatch/logic/CClientGame.cpp:377 +msgid "Quaddin' around" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:539 -#, c-format -msgid "" -"Disconnected: Server from different branch.\n" -"Information: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:378 +msgid "Bunny hopping around" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:544 -#, c-format -msgid "" -"Disconnected: Bad version.\n" -"Information: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:378 +msgid "Doing weird stuff in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:549 -#, c-format -msgid "" -"Disconnected: Server is running a newer build.\n" -"Information: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:382 +msgid "Climbing around in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:554 -#, c-format -msgid "" -"Disconnected: Server is running an older build.\n" -"Information: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:383 +#: Client/mods/deathmatch/logic/CClientGame.cpp:384 +msgid "Doing a drive-by in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:559 -msgid "Disconnected: Nick already in use" +#: Client/mods/deathmatch/logic/CClientGame.cpp:385 +msgid "Blub blub..." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:563 -msgid "Disconnected: Player element could not be created." +#: Client/mods/deathmatch/logic/CClientGame.cpp:386 +msgid "Breathing water" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:567 -#, c-format -msgid "Disconnected: Server refused the connection: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:387 +msgid "Drowning in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:572 -msgid "Disconnected: Serial verification failed" +#: Client/mods/deathmatch/logic/CClientGame.cpp:388 +msgid "Ducking for cover in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:576 -#, c-format -msgid "Disconnected: Connection desync %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:389 +msgid "Fighting in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:585 -#, c-format -msgid "Disconnected: You were kicked by %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:390 +msgid "Throwing fists in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:590 -#, c-format -msgid "Disconnected: You were banned by %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:391 +msgid "Blastin' fools in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:601 -msgid "Disconnected: Server shutdown or restarting" +#: Client/mods/deathmatch/logic/CClientGame.cpp:392 +msgid "Shooting up" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:621 -msgid "You were kicked from the game" +#: Client/mods/deathmatch/logic/CClientGame.cpp:393 +msgid "Jetpacking in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:622 -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:633 -msgid "This server requires a non-modifed gta_sa.exe" +#: Client/mods/deathmatch/logic/CClientGame.cpp:394 +msgid "Literally on fire in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:623 -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:634 -msgid "Please replace gta_sa.exe" +#: Client/mods/deathmatch/logic/CClientGame.cpp:395 +msgid "Burning up in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:624 -msgid "This server does not allow custom D3D9.DLLs" +#: Client/mods/deathmatch/logic/CClientGame.cpp:396 +msgid "Swimming in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:625 -msgid "Remove D3D9.DLL from your GTA install directory and restart MTA" +#: Client/mods/deathmatch/logic/CClientGame.cpp:397 +msgid "Floating around in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:626 -msgid "This server does not allow virtual machines" +#: Client/mods/deathmatch/logic/CClientGame.cpp:398 +msgid "Being chased by a shark" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:627 -msgid "This server requires driver signing to be enabled" +#: Client/mods/deathmatch/logic/CClientGame.cpp:399 +msgid "Choking to death in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:628 -msgid "Please restart your PC" +#: Client/mods/deathmatch/logic/CClientGame.cpp:534 +#: Client/core/CMainMenu.cpp:304 Client/core/CCore.cpp:674 +#: Client/core/CSettings.cpp:3506 +msgid "Main menu" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:629 -msgid "This server has detected missing anti-cheat components" +#. Show timeout message and disconnect +#. Display an error, reset the error status and exit +#. Show a message that the connection timed out and abort +#. Show failed message and abort the attempt +#: Client/mods/deathmatch/logic/CClientGame.cpp:642 +#: Client/mods/deathmatch/logic/CClientGame.cpp:716 +#: Client/mods/deathmatch/logic/CClientGame.cpp:740 +#: Client/mods/deathmatch/logic/CClientGame.cpp:762 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1175 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1255 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1265 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1334 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1371 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1420 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1432 +#: Client/mods/deathmatch/logic/CResourceFileDownloadManager.cpp:145 +#: 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:1279 +#: Client/core/CCore.cpp:1292 Client/core/CSettings.cpp:2966 +#: Client/core/CSettings.cpp:4204 Client/core/CSettings.cpp:4232 +#: Client/core/CSettings.cpp:4802 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 +#: Client/core/CConnectManager.cpp:421 +#: Client/core/DXHook/CDirect3DHook9.cpp:127 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1285 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1307 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1364 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1413 +#: Shared/mods/deathmatch/logic/CLatentTransferManager.cpp:378 +#: Shared/sdk/SharedUtil.Misc.hpp:137 +msgid "Error" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:630 -msgid "Try restarting MTA" +#: Client/mods/deathmatch/logic/CClientGame.cpp:642 +#: Client/mods/deathmatch/logic/CClientGame.cpp:740 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1307 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1364 +msgid "Invalid nickname! Please go to Settings and set a new one!" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:631 -msgid "This server requires a non-modifed gta3.img and gta_int.img" +#. Display the status box +#: Client/mods/deathmatch/logic/CClientGame.cpp:658 +#: Client/core/CConnectManager.cpp:148 +msgid "CONNECTING" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:632 -msgid "Please replace gta3.img or gta_int.img" +#: Client/mods/deathmatch/logic/CClientGame.cpp:658 +msgid "Entering the game ..." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:635 -msgid "This server does not allow Wine" +#: Client/mods/deathmatch/logic/CClientGame.cpp:716 +msgid "" +"Not connected; please use Quick Connect or the 'connect' command to connect " +"to a server." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:636 -msgid "Ensure no other program is modifying MTA:SA" +#: Client/mods/deathmatch/logic/CClientGame.cpp:762 +msgid "Could not start the local server. See console for details." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:650 -msgid "Time Remaining: " +#: Client/mods/deathmatch/logic/CClientGame.cpp:772 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1244 +msgid "Local Server" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:660 -#, c-format -msgid "%d day" -msgid_plural "%d days" -msgstr[0] "" -msgstr[1] "" +#: Client/mods/deathmatch/logic/CClientGame.cpp:772 +msgid "Starting local server ..." +msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:662 -#, c-format -msgid "%d hour" -msgid_plural "%d hours" -msgstr[0] "" -msgstr[1] "" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1020 +msgid "Area 51" +msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:664 -#, c-format -msgid "%d minute" -msgid_plural "%d minutes" -msgstr[0] "" -msgstr[1] "" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1029 +msgid "Walking around " +msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:666 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1175 #, c-format -msgid "%d second" -msgid_plural "%d seconds" -msgstr[0] "" -msgstr[1] "" +msgid "You were kicked from the game ( %s )" +msgstr "" -#. Display the error -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:670 -msgid "Disconnected" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1244 +msgid "Connecting to local server..." msgstr "" -#: Client/mods/deathmatch/logic/CResource.cpp:375 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1089 -#: Client/core/CSettings.cpp:3483 Client/core/CCore.cpp:674 -msgid "In-game" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1255 +msgid "Error connecting to server." msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:374 -msgid "Flying a UFO around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1265 +msgid "Connecting to local server timed out. See console for details." msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:374 -msgid "Cruising around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1334 +#: Client/core/CConnectManager.cpp:263 +msgid "Connection timed out" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:374 -msgid "Riding the waves of" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1371 +msgid "Connection with the server was lost" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:375 -msgid "Riding the train in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1382 +#: Client/core/CConnectManager.cpp:277 Client/core/CConnectManager.cpp:281 +msgid "Disconnected: unknown protocol error" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:375 -msgid "Flying around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1386 +#: Client/core/CConnectManager.cpp:285 +msgid "Disconnected: disconnected remotely" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:376 -msgid "Riding around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1390 +#: Client/core/CConnectManager.cpp:289 +msgid "Disconnected: connection lost remotely" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:376 -msgid "Monster truckin' around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1394 +#: Client/core/CConnectManager.cpp:293 +msgid "Disconnected: you are banned from this server" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:376 -msgid "Quaddin' around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1398 +msgid "Disconnected: the server is currently full" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:377 -msgid "Bunny hopping around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1402 +#: Client/core/CConnectManager.cpp:300 +msgid "Disconnected: disconnected from the server" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:377 -msgid "Doing weird stuff in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1406 +#: Client/core/CConnectManager.cpp:304 +msgid "Disconnected: connection to the server was lost" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:381 -msgid "Climbing around in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1410 +msgid "Disconnected: invalid password specified" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:382 -#: Client/mods/deathmatch/logic/CClientGame.cpp:383 -msgid "Doing a drive-by in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1414 +#: Client/core/CConnectManager.cpp:311 +msgid "Disconnected: connection was refused" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:384 -msgid "Blub blub..." +#: Client/mods/deathmatch/logic/CClientGame.cpp:1432 +msgid "MTA Client verification failed!" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:385 -msgid "Breathing water" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5620 +msgid "In a ditch" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:386 -msgid "Drowning in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5620 +msgid "En-route to hospital" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:387 -msgid "Ducking for cover in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5620 +msgid "Meeting their maker" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:388 -msgid "Fighting in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5621 +msgid "Regretting their decisions" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:389 -msgid "Throwing fists in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5621 +msgid "Wasted" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:390 -msgid "Blastin' fools in" +#: Client/mods/deathmatch/logic/CPlayerMap.cpp:74 +#, c-format +msgid "Change mode: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:391 -msgid "Shooting up" +#: Client/mods/deathmatch/logic/CPlayerMap.cpp:76 +#, c-format +msgid "Zoom: %s/%s Movement: %s, %s, %s, %s Opacity: %s/%s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:392 -msgid "Jetpacking in" +#: Client/mods/deathmatch/logic/CPlayerMap.cpp:80 +#, c-format +msgid "Toggle map: %s Toggle help text: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:393 -msgid "Literally on fire in" +#: Client/mods/deathmatch/logic/CPlayerMap.cpp:714 +msgid "Following Player" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:394 -msgid "Burning up in" +#: Client/mods/deathmatch/logic/CPlayerMap.cpp:716 +msgid "Free Movement" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:395 -msgid "Swimming in" +#: Client/mods/deathmatch/logic/CTransferBox.cpp:25 +msgid "Map download progress:" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:396 -msgid "Floating around in" +#: Client/mods/deathmatch/logic/CTransferBox.cpp:28 +msgid "Download Progress:" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:397 -msgid "Being chased by a shark" +#. Find our largest piece of text, so we can size accordingly +#: Client/mods/deathmatch/logic/CTransferBox.cpp:42 +#: Client/mods/deathmatch/logic/CTransferBox.cpp:105 +#, c-format +msgid "%s of %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:398 -msgid "Choking to death in" +#: Client/mods/deathmatch/logic/CTransferBox.cpp:44 +#: Client/mods/deathmatch/logic/CTransferBox.cpp:65 +msgid "Disconnect to cancel download" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:533 -#: Client/core/CSettings.cpp:3479 Client/core/CCore.cpp:674 -#: Client/core/CMainMenu.cpp:304 -msgid "Main menu" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:506 +msgid "Disconnected: Invalid nickname" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:641 -#: Client/mods/deathmatch/logic/CClientGame.cpp:739 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1300 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1357 -msgid "Invalid nickname! Please go to Settings and set a new one!" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:510 +msgid "Disconnect from server" msgstr "" -#. Display the status box -#: Client/mods/deathmatch/logic/CClientGame.cpp:657 -#: Client/core/CConnectManager.cpp:148 -msgid "CONNECTING" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:514 +#, c-format +msgid "" +"Disconnected: Serial is banned.\n" +"Reason: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:657 -msgid "Entering the game ..." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:520 +#, c-format +msgid "" +"Disconnected: You are banned.\n" +"Reason: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:715 +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:526 +#, c-format msgid "" -"Not connected; please use Quick Connect or the 'connect' command to connect " -"to a server." +"Disconnected: Account is banned.\n" +"Reason: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:761 -msgid "Could not start the local server. See console for details." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:531 +msgid "Disconnected: Version mismatch" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:771 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1243 -msgid "Local Server" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:535 +msgid "Disconnected: Join flood. Please wait a minute, then reconnect." msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:771 -msgid "Starting local server ..." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:539 +#, c-format +msgid "" +"Disconnected: Server from different branch.\n" +"Information: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1019 -msgid "Area 51" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:544 +#, c-format +msgid "" +"Disconnected: Bad version.\n" +"Information: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1028 -msgid "Walking around " +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:549 +#, c-format +msgid "" +"Disconnected: Server is running a newer build.\n" +"Information: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1174 +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:554 #, c-format -msgid "You were kicked from the game ( %s )" +msgid "" +"Disconnected: Server is running an older build.\n" +"Information: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1243 -msgid "Connecting to local server..." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:559 +msgid "Disconnected: Nick already in use" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1254 -msgid "Error connecting to server." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:563 +msgid "Disconnected: Player element could not be created." msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1264 -msgid "Connecting to local server timed out. See console for details." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:567 +#, c-format +msgid "Disconnected: Server refused the connection: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1333 -#: Client/core/CConnectManager.cpp:263 -msgid "Connection timed out" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:572 +msgid "Disconnected: Serial verification failed" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1370 -msgid "Connection with the server was lost" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:576 +msgid "Disconnected: Serial already in use" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1381 -#: Client/core/CConnectManager.cpp:277 Client/core/CConnectManager.cpp:281 -msgid "Disconnected: unknown protocol error" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:580 +#, c-format +msgid "Disconnected: Connection desync %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1385 -#: Client/core/CConnectManager.cpp:285 -msgid "Disconnected: disconnected remotely" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:589 +#, c-format +msgid "Disconnected: You were kicked by %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1389 -#: Client/core/CConnectManager.cpp:289 -msgid "Disconnected: connection lost remotely" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:594 +#, c-format +msgid "Disconnected: You were banned by %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1393 -#: Client/core/CConnectManager.cpp:293 -msgid "Disconnected: you are banned from this server" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:605 +msgid "Disconnected: Server shutdown or restarting" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1397 -msgid "Disconnected: the server is currently full" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:625 +msgid "You were kicked from the game" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1401 -#: Client/core/CConnectManager.cpp:300 -msgid "Disconnected: disconnected from the server" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:626 +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:637 +msgid "This server requires a non-modifed gta_sa.exe" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1405 -#: Client/core/CConnectManager.cpp:304 -msgid "Disconnected: connection to the server was lost" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:627 +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:638 +msgid "Please replace gta_sa.exe" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1409 -msgid "Disconnected: invalid password specified" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:628 +msgid "This server does not allow custom D3D9.DLLs" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1413 -#: Client/core/CConnectManager.cpp:311 -msgid "Disconnected: connection was refused" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:629 +msgid "Remove D3D9.DLL from your GTA install directory and restart MTA" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1431 -msgid "MTA Client verification failed!" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:630 +msgid "This server does not allow virtual machines" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5623 -msgid "In a ditch" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:631 +msgid "This server requires driver signing to be enabled" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5623 -msgid "En-route to hospital" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:632 +msgid "Please restart your PC" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5623 -msgid "Meeting their maker" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:633 +msgid "This server has detected missing anti-cheat components" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5624 -msgid "Regretting their decisions" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:634 +msgid "Try restarting MTA" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5624 -msgid "Wasted" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:635 +msgid "This server requires a non-modifed gta3.img and gta_int.img" +msgstr "" + +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:636 +msgid "Please replace gta3.img or gta_int.img" +msgstr "" + +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:639 +msgid "This server does not allow Wine" +msgstr "" + +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:640 +msgid "Ensure no other program is modifying MTA:SA" +msgstr "" + +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:654 +msgid "Time Remaining: " +msgstr "" + +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:664 +#, c-format +msgid "%d day" +msgid_plural "%d days" +msgstr[0] "" +msgstr[1] "" + +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:666 +#, c-format +msgid "%d hour" +msgid_plural "%d hours" +msgstr[0] "" +msgstr[1] "" + +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:668 +#, c-format +msgid "%d minute" +msgid_plural "%d minutes" +msgstr[0] "" +msgstr[1] "" + +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:670 +#, c-format +msgid "%d second" +msgid_plural "%d seconds" +msgstr[0] "" +msgstr[1] "" + +#. Display the error +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:674 +msgid "Disconnected" msgstr "" #: Client/mods/deathmatch/logic/CLocalServer.cpp:37 @@ -680,8 +704,8 @@ msgstr "" #. * Webbrowser tab #. * #: 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:458 Client/core/CSettings.cpp:917 +#: Client/core/CSettings.cpp:2043 msgid "General" msgstr "" @@ -734,1070 +758,1155 @@ msgstr "" #. Cancel button #: Client/mods/deathmatch/logic/CLocalServer.cpp:123 -#: Client/core/CSettings.cpp:132 Client/core/CSettings.cpp:4784 +#: 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/loader/Dialogs.cpp:136 -#: Client/gui/CGUIMessageBox_Impl.cpp:68 +#: Client/core/CVersionUpdater.cpp:1841 Client/core/CSettings.cpp:132 +#: Client/core/CSettings.cpp:4822 msgid "Cancel" msgstr "" -#: Client/mods/deathmatch/logic/CTransferBox.cpp:25 -msgid "Map download progress:" +#. Throw the error and disconnect +#: Client/mods/deathmatch/logic/CResourceFileDownloadManager.cpp:141 +#, c-format +msgid "Download error: %s" msgstr "" -#: Client/mods/deathmatch/logic/CTransferBox.cpp:28 -msgid "Download Progress:" +#: Client/game_sa/CSettingsSA.cpp:781 +msgid "Can't find valid screen resolution." msgstr "" -#. Find our largest piece of text, so we can size accordingly -#: Client/mods/deathmatch/logic/CTransferBox.cpp:42 -#: Client/mods/deathmatch/logic/CTransferBox.cpp:105 -#, c-format -msgid "%s of %s" +#. Confirm that res should be used +#: Client/game_sa/CSettingsSA.cpp:857 +msgid "Are you sure you want to use this screen resolution?" msgstr "" -#: Client/mods/deathmatch/logic/CTransferBox.cpp:44 -#: Client/mods/deathmatch/logic/CTransferBox.cpp:65 -msgid "Disconnect to cancel download" +#: Client/game_sa/CSettingsSA.cpp:859 Client/loader/Dialogs.cpp:194 +msgid "MTA: San Andreas" msgstr "" -#: Client/core/CScreenShot.cpp:104 -#, c-format -msgid "Screenshot got %d bytes, but expected %d" +#. Couldn't create render target for CPostEffects +#: Client/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp:1450 +msgid "Problem with graphics driver" msgstr "" -#: Client/core/CScreenShot.cpp:110 -msgid "Screenshot failed" +#. Create buttons +#. OK button +#: Client/gui/CGUIMessageBox_Impl.cpp:64 Client/loader/Dialogs.cpp:133 +#: Client/core/CVersionUpdater.cpp:1607 Client/core/CVersionUpdater.cpp:1823 +#: Client/core/CVersionUpdater.cpp:1916 Client/core/CVersionUpdater.cpp:1938 +#: 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:4823 +msgid "OK" msgstr "" -#: Client/core/CScreenShot.cpp:160 -#, c-format -msgid "Screenshot taken: '%s'" +#. ///////////////////////////////////////////////////////////////////////// +#. +#. Dialog strings +#. +#. +#. ///////////////////////////////////////////////////////////////////////// +#: Client/gui/CGUIMessageBox_Impl.cpp:72 Client/loader/Dialogs.cpp:131 +#: 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:1407 Client/core/CSettings.cpp:1431 +#: Client/core/CSettings.cpp:4527 Client/core/CSettings.cpp:4601 +#: Client/core/CSettings.cpp:4631 Client/core/CSettings.cpp:4680 +#: Client/core/ServerBrowser/CServerInfo.cpp:481 +msgid "Yes" msgstr "" -#. Create window (with frame) if it will fit inside the screen resolution -#: Client/core/CSettings.cpp:84 -msgid "SETTINGS" +#: Client/loader/Install.cpp:265 +msgid "Unknown" msgstr "" -#: Client/core/CSettings.cpp:116 -msgid "Multiplayer" +#: Client/loader/Install.cpp:272 +#, c-format +msgid "" +"The file '%s' is currently locked by %zu processes.\n" +"\n" +"Do you want to terminate the following processes and continue updating?\n" +"\n" +"%s" msgstr "" -#: Client/core/CSettings.cpp:117 -msgid "Video" +#: Client/loader/Install.cpp:479 +#, c-format +msgid "" +"Your installation may be corrupt now.\n" +"\n" +"%zu out of %zu files could not be restored from the backup.\n" +"\n" +"You should reinstall Multi Theft Auto from www.multitheftauto.com\n" +"or try running the update with administrator rights." msgstr "" -#: Client/core/CSettings.cpp:118 -msgid "Audio" +#: Client/loader/Install.cpp:852 Client/loader/Dialogs.cpp:901 +msgid "Installing update..." msgstr "" -#: Client/core/CSettings.cpp:119 -msgid "Binds" +#: Client/loader/Install.cpp:934 Client/loader/Dialogs.cpp:909 +msgid "Extracting files..." msgstr "" -#: Client/core/CSettings.cpp:120 -msgid "Controls" +#: Client/loader/Utils.cpp:534 Client/loader/Dialogs.cpp:890 +msgid "Searching for Grand Theft Auto San Andreas" msgstr "" -#: Client/core/CSettings.cpp:121 -msgid "Interface" +#: Client/loader/Utils.cpp:536 Client/loader/Dialogs.cpp:893 +msgid "Please start Grand Theft Auto San Andreas" msgstr "" -#: Client/core/CSettings.cpp:122 -msgid "Web Browser" +#: Client/loader/Utils.cpp:600 +msgid "Select your Grand Theft Auto: San Andreas Installation Directory" msgstr "" -#: Client/core/CSettings.cpp:123 -msgid "Advanced" +#: Client/loader/Utils.cpp:968 Client/loader/CInstallManager.cpp:361 +#, c-format +msgid "" +"MTA:SA needs Administrator access for the following task:\n" +"\n" +" '%s'\n" +"\n" +"Please confirm in the next window." msgstr "" -#. Create buttons -#. OK button -#: Client/core/CSettings.cpp:127 Client/core/CSettings.cpp:4785 -#: Client/core/CVersionUpdater.cpp:1607 Client/core/CVersionUpdater.cpp:1823 -#: Client/core/CVersionUpdater.cpp:1916 Client/core/CVersionUpdater.cpp:1938 -#: 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/loader/Dialogs.cpp:133 Client/gui/CGUIMessageBox_Impl.cpp:64 -msgid "OK" +#: Client/loader/Utils.cpp:1069 +#, c-format +msgid "Error loading %s module! (%s)" msgstr "" -#: Client/core/CSettings.cpp:147 Client/core/CSettings.cpp:338 -#: Client/core/CSettings.cpp:617 Client/core/CSettings.cpp:889 -msgid "Load defaults" +#: Client/loader/Utils.cpp:1394 Client/loader/Dialogs.cpp:914 +msgid "Copying files..." msgstr "" -#. * -#. * Controls tab -#. * -#: Client/core/CSettings.cpp:157 Client/core/CSettings.cpp:181 -msgid "Mouse sensitivity:" +#: Client/loader/Utils.cpp:1454 Client/loader/Dialogs.cpp:919 +msgid "Copy finished early. Everything OK." msgstr "" -#. VerticalAimSensitivity -#: Client/core/CSettings.cpp:157 Client/core/CSettings.cpp:199 -msgid "Vertical aim sensitivity:" +#: Client/loader/Utils.cpp:1460 Client/loader/Dialogs.cpp:924 +msgid "Finishing..." msgstr "" -#. Mouse Options -#: Client/core/CSettings.cpp:160 -msgid "Mouse options" +#: Client/loader/Utils.cpp:1462 Client/loader/Dialogs.cpp:928 +msgid "Done!" msgstr "" -#: Client/core/CSettings.cpp:167 -msgid "Invert mouse vertically" +#: Client/loader/Utils.cpp:1502 +#, c-format +msgid "" +"New installation of %s detected.\n" +"\n" +"Do you want to copy your settings from %s ?" msgstr "" -#: Client/core/CSettings.cpp:171 -msgid "Steer with mouse" +#: Client/loader/Utils.cpp:1541 +#, c-format +msgid "GTA:SA had trouble opening the file '%s'" msgstr "" -#: Client/core/CSettings.cpp:175 -msgid "Fly with mouse" +#: Client/loader/Utils.cpp:1563 +#, c-format +msgid "GTA:SA is missing the file '%s'." msgstr "" -#. Joypad options -#: Client/core/CSettings.cpp:217 -msgid "Joypad options" +#: Client/loader/Utils.cpp:1588 +msgid "GTA:SA had trouble loading a model." msgstr "" -#: Client/core/CSettings.cpp:230 -msgid "Standard controls (Mouse + Keyboard)" +#: Client/loader/Utils.cpp:1590 +msgid "If you recently modified gta3.img, then try reinstalling GTA:SA." msgstr "" -#: Client/core/CSettings.cpp:237 -msgid "Classic controls (Joypad)" +#: Client/loader/Utils.cpp:1615 +msgid "GTA:SA had trouble adding an upgrade to a vehicle." msgstr "" -#: Client/core/CSettings.cpp:274 -msgid "Dead Zone" +#: Client/loader/Utils.cpp:1634 +#, c-format +msgid "GTA:SA found errors in the file '%s'" msgstr "" -#: Client/core/CSettings.cpp:279 -msgid "Saturation" +#: Client/loader/Utils.cpp:1716 +msgid "Did your computer restart when playing MTA:SA?" msgstr "" -#: Client/core/CSettings.cpp:285 -msgid "Use the 'Binds' tab for joypad buttons." +#: Client/loader/Utils.cpp:1781 +msgid "Please terminate the following programs before continuing:" msgstr "" -#: Client/core/CSettings.cpp:324 -msgid "Left Stick" +#: 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:1406 +#: Client/core/CSettings.cpp:1430 Client/core/CSettings.cpp:4526 +#: Client/core/CSettings.cpp:4600 Client/core/CSettings.cpp:4630 +#: Client/core/CSettings.cpp:4679 Client/core/ServerBrowser/CServerInfo.cpp:481 +msgid "No" msgstr "" -#: Client/core/CSettings.cpp:330 -msgid "Right Stick" +#: Client/loader/Dialogs.cpp:134 +msgid "Quit" msgstr "" -#: Client/core/CSettings.cpp:345 -msgid "DESCRIPTION" +#: Client/loader/Dialogs.cpp:135 +#: Client/core/ServerBrowser/CServerBrowser.cpp:556 +msgid "Help" msgstr "" -#: Client/core/CSettings.cpp:346 -msgid "KEY" +#: Client/loader/Dialogs.cpp:151 +msgid "MTA: San Andreas has encountered a problem" msgstr "" -#: Client/core/CSettings.cpp:348 -msgid "ALT. KEY" +#: Client/loader/Dialogs.cpp:152 +msgid "Crash information" msgstr "" -#. * -#. * Multiplayer tab -#. * -#: Client/core/CSettings.cpp:353 Client/core/CSettings.cpp:356 -msgid "Nick:" +#: Client/loader/Dialogs.cpp:153 +msgid "" +"Tick the check box to send this crash info to MTA devs using the 'internet'" msgstr "" -#: Client/core/CSettings.cpp:378 -msgid "Save server passwords" +#: Client/loader/Dialogs.cpp:154 +msgid "Doing so will increase the chance of this crash being fixed." msgstr "" -#: Client/core/CSettings.cpp:383 -msgid "Auto-refresh server browser" +#: Client/loader/Dialogs.cpp:155 +msgid "Do you want to restart MTA: San Andreas ?" msgstr "" -#: Client/core/CSettings.cpp:388 -msgid "Allow screen upload" +#: Client/loader/Dialogs.cpp:162 +msgid "MTA: San Andreas - Warning" msgstr "" -#: Client/core/CSettings.cpp:393 -msgid "Allow external sounds" +#: Client/loader/Dialogs.cpp:163 +msgid "" +"Your Grand Theft Auto: San Andreas install directory contains these files:" msgstr "" -#: Client/core/CSettings.cpp:398 -msgid "Always show download window" +#: Client/loader/Dialogs.cpp:165 +msgid "" +"These files are not required and may interfere with the graphical features " +"in this version of MTA:SA.\n" +"\n" +"It is recommended that you remove or rename these files." msgstr "" -#: Client/core/CSettings.cpp:403 -msgid "Allow connecting with Discord Rich Presence" +#: Client/loader/Dialogs.cpp:167 +msgid "Keep these files, but also show this warning on next start" msgstr "" -#: Client/core/CSettings.cpp:408 -msgid "Use customized GTA:SA files" +#: Client/loader/Dialogs.cpp:168 +msgid "Do not remind me about these files again" msgstr "" -#: Client/core/CSettings.cpp:413 -msgid "Map rendering options" +#: Client/loader/Dialogs.cpp:169 +msgid "Rename these files from *.dll to *.dll.bak" msgstr "" -#: Client/core/CSettings.cpp:419 Client/core/CSettings.cpp:628 -msgid "Opacity:" +#: Client/loader/Dialogs.cpp:170 +msgid "Show me these files" msgstr "" -#. * -#. * Audio tab -#. * -#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:448 -msgid "Master volume:" +#: Client/loader/Dialogs.cpp:171 +msgid "Play MTA:SA" msgstr "" -#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:467 -msgid "Radio volume:" +#: Client/loader/Dialogs.cpp:177 +msgid "MTA: San Andreas - Confusing options" msgstr "" -#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:486 -msgid "SFX volume:" +#: Client/loader/Dialogs.cpp:178 +msgid "NVidia Optimus detected!" msgstr "" -#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:505 -msgid "MTA volume:" +#: Client/loader/Dialogs.cpp:179 +msgid "Try each option and see what works:" msgstr "" -#: Client/core/CSettings.cpp:440 Client/core/CSettings.cpp:524 -msgid "Voice volume:" +#: Client/loader/Dialogs.cpp:180 +msgid "A - Standard NVidia" msgstr "" -#: Client/core/CSettings.cpp:440 Client/core/CSettings.cpp:565 -msgid "Play mode:" +#: Client/loader/Dialogs.cpp:181 +msgid "B - Alternate NVidia" msgstr "" -#: Client/core/CSettings.cpp:543 -msgid "Radio options" +#: Client/loader/Dialogs.cpp:182 +msgid "C - Standard Intel" msgstr "" -#: Client/core/CSettings.cpp:549 -msgid "Radio Equalizer" +#: Client/loader/Dialogs.cpp:183 +msgid "D - Alternate Intel" msgstr "" -#: Client/core/CSettings.cpp:554 -msgid "Radio Auto-tune" +#: Client/loader/Dialogs.cpp:184 +msgid "If you get desperate, this might help:" msgstr "" -#: Client/core/CSettings.cpp:559 -msgid "Usertrack options" +#: Client/loader/Dialogs.cpp:185 +msgid "If you have already selected an option that works, this might help:" msgstr "" -#: Client/core/CSettings.cpp:573 Client/core/CSettings.cpp:3087 -msgid "Radio" +#: Client/loader/Dialogs.cpp:186 +msgid "Force windowed mode" msgstr "" -#: Client/core/CSettings.cpp:574 Client/core/CSettings.cpp:3089 -msgid "Random" +#: Client/loader/Dialogs.cpp:187 +msgid "Don't show again" msgstr "" -#: Client/core/CSettings.cpp:575 Client/core/CSettings.cpp:3091 -msgid "Sequential" +#: Client/loader/Dialogs.cpp:195 +msgid "Warning: Could not detect anti-virus product" msgstr "" -#: Client/core/CSettings.cpp:578 -msgid "Automatic Media Scan" +#: Client/loader/Dialogs.cpp:197 +msgid "" +"MTA could not detect an anti-virus on your PC.\n" +"\n" +"Viruses interfere with MTA and degrade your gameplay experience.\n" +"\n" +"Press 'Help' for more information." msgstr "" -#: Client/core/CSettings.cpp:585 -msgid "Mute options" +#: Client/loader/Dialogs.cpp:200 +msgid "I have already installed an anti-virus" msgstr "" -#: Client/core/CSettings.cpp:591 -msgid "Mute All sounds when minimized" +#: Client/loader/Dialogs.cpp:202 +msgid "" +"I will not install an anti-virus.\n" +"I want my PC to lag and be part of a botnet." msgstr "" -#: Client/core/CSettings.cpp:596 -msgid "Mute Radio sounds when minimized" +#: Client/loader/MainFunctions.cpp:248 +msgid "" +"Trouble restarting MTA:SA\n" +"\n" +"If the problem persists, open Task Manager and\n" +"stop the 'gta_sa.exe' and 'Multi Theft Auto.exe' processes\n" +"\n" +"\n" +"Try to launch MTA:SA again?" msgstr "" -#: Client/core/CSettings.cpp:601 -msgid "Mute SFX sounds when minimized" +#: Client/loader/MainFunctions.cpp:266 +msgid "" +"Another instance of MTA is already running.\n" +"\n" +"If this problem persists, please restart your computer" msgstr "" -#: Client/core/CSettings.cpp:606 -msgid "Mute MTA sounds when minimized" +#: Client/loader/MainFunctions.cpp:269 +msgid "" +"Another instance of MTA is already running.\n" +"\n" +"Do you want to terminate it?" msgstr "" -#: Client/core/CSettings.cpp:611 -msgid "Mute Voice sounds when minimized" +#: Client/loader/MainFunctions.cpp:294 +msgid "" +"Are you having problems running MTA:SA?.\n" +"\n" +"Do you want to revert to an earlier version?" msgstr "" -#. * -#. * Video tab -#. * -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:636 -msgid "Resolution:" +#: Client/loader/MainFunctions.cpp:324 +msgid "" +"There seems to be a problem launching MTA:SA.\n" +"Resetting GTA settings can sometimes fix this problem.\n" +"\n" +"Do you want to reset GTA settings now?" msgstr "" -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:683 -msgid "FOV:" +#: Client/loader/MainFunctions.cpp:339 +msgid "" +"GTA settings have been reset.\n" +"\n" +"Press OK to continue." msgstr "" -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:699 -msgid "Draw Distance:" +#: Client/loader/MainFunctions.cpp:344 +#, c-format +msgid "File could not be deleted: '%s'" msgstr "" -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:717 -msgid "Brightness:" +#. No settings to delete, or can't find them +#: Client/loader/MainFunctions.cpp:352 +msgid "" +"Are you having problems running MTA:SA?.\n" +"\n" +"Do you want to see some online help?" msgstr "" -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:735 -msgid "FX Quality:" +#. Inform user +#: Client/loader/MainFunctions.cpp:388 +msgid "" +"Are you having problems running MTA:SA?.\n" +"\n" +"Do you want to change the following setting?" msgstr "" -#: Client/core/CSettings.cpp:628 Client/core/CSettings.cpp:749 -msgid "Anisotropic filtering:" +#: Client/loader/MainFunctions.cpp:389 Client/core/CSettings.cpp:675 +#: Client/core/CSettings.cpp:1021 +msgid "Fullscreen mode:" msgstr "" -#: Client/core/CSettings.cpp:628 Client/core/CSettings.cpp:776 -msgid "Anti-aliasing:" +#: Client/loader/MainFunctions.cpp:389 Client/core/CSettings.cpp:683 +#: Client/core/CSettings.cpp:1633 +msgid "Borderless window" msgstr "" -#: Client/core/CSettings.cpp:628 Client/core/CSettings.cpp:790 -msgid "Aspect Ratio:" +#: Client/loader/MainFunctions.cpp:431 +msgid "" +"Are you having problems running MTA:SA?.\n" +"\n" +"Try disabling the following products for GTA and MTA:" msgstr "" -#: Client/core/CSettings.cpp:648 -msgid "Windowed" +#: Client/loader/MainFunctions.cpp:465 +msgid "" +"WARNING\n" +"\n" +"MTA:SA has detected unusual activity.\n" +"Please run a virus scan to ensure your system is secure.\n" +"\n" msgstr "" -#: Client/core/CSettings.cpp:654 -msgid "DPI aware" +#: Client/loader/MainFunctions.cpp:468 +#, c-format +msgid "The detected file was: %s\n" msgstr "" -#: Client/core/CSettings.cpp:662 Client/core/CSettings.cpp:1004 -#: Client/loader/MainFunctions.cpp:389 -msgid "Fullscreen mode:" +#: Client/loader/MainFunctions.cpp:602 +msgid "" +"An instance of GTA: San Andreas is already running. It needs to be " +"terminated before MTA:SA can be started. Do you want to do that now?" msgstr "" -#: Client/core/CSettings.cpp:669 Client/core/CSettings.cpp:1613 -msgid "Standard" +#: Client/loader/MainFunctions.cpp:603 Client/loader/MainFunctions.cpp:610 +#: Client/loader/MainFunctions.cpp:1219 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1387 +#: Client/core/ServerBrowser/CServerInfo.cpp:319 +msgid "Information" msgstr "" -#: Client/core/CSettings.cpp:670 Client/core/CSettings.cpp:1615 -#: Client/loader/MainFunctions.cpp:389 -msgid "Borderless window" +#: Client/loader/MainFunctions.cpp:609 +msgid "" +"Unable to terminate GTA: San Andreas. If the problem persists, please " +"restart your computer." msgstr "" -#: Client/core/CSettings.cpp:671 Client/core/CSettings.cpp:1617 -msgid "Borderless keep res" +#: Client/loader/MainFunctions.cpp:632 +msgid "" +"Registry entries are missing. Please reinstall Multi Theft Auto: San Andreas." msgstr "" -#: Client/core/CSettings.cpp:675 -msgid "Mip Mapping" +#: Client/loader/MainFunctions.cpp:638 +msgid "" +"The path to your installation of GTA: San Andreas contains unsupported " +"(unicode) characters. Please move your Grand Theft Auto: San Andreas " +"installation to a compatible path that contains only standard ASCII " +"characters and reinstall Multi Theft Auto: San Andreas." msgstr "" -#: Client/core/CSettings.cpp:743 Client/core/CSettings.cpp:1517 -msgid "Low" +#: Client/loader/MainFunctions.cpp:648 +msgid "" +"The path to your installation of 'MTA:SA' or 'GTA: San Andreas'\n" +"contains a ';' (semicolon).\n" +"\n" +" If you experience problems when running MTA:SA,\n" +" move your installation(s) to a path that does not contain a semicolon." msgstr "" -#: Client/core/CSettings.cpp:744 Client/core/CSettings.cpp:1519 -msgid "Medium" +#: Client/loader/MainFunctions.cpp:810 +msgid "" +"Load failed. Please ensure that the latest data files have been installed " +"correctly." msgstr "" -#: Client/core/CSettings.cpp:745 Client/core/CSettings.cpp:1086 -#: Client/core/CSettings.cpp:1521 Client/core/CSettings.cpp:3145 -msgid "High" +#: Client/loader/MainFunctions.cpp:819 +#, c-format +msgid "Load failed. Please ensure that %s is installed correctly." msgstr "" -#: Client/core/CSettings.cpp:746 Client/core/CSettings.cpp:1523 -msgid "Very high" +#: Client/loader/MainFunctions.cpp:826 +#, c-format +msgid "Load failed. Could not find gta_sa.exe in %s." 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 -msgid "Off" +#: Client/loader/MainFunctions.cpp:836 +#, c-format +msgid "" +"Load failed. %s exists in the GTA directory. Please delete before continuing." msgstr "" -#: Client/core/CSettings.cpp:785 Client/core/CSettings.cpp:1529 -msgid "1x" +#: Client/loader/MainFunctions.cpp:845 +#, c-format +msgid "Main file has an incorrect name (%s)" msgstr "" -#: Client/core/CSettings.cpp:786 Client/core/CSettings.cpp:1531 -msgid "2x" +#: Client/loader/MainFunctions.cpp:856 +msgid "" +"Main file is unsigned. Possible virus activity.\n" +"\n" +"See online help if MTA does not work correctly." msgstr "" -#: Client/core/CSettings.cpp:787 Client/core/CSettings.cpp:1533 -msgid "3x" +#: Client/loader/MainFunctions.cpp:882 +#, c-format +msgid "" +"Data file %s is missing. Possible virus activity.\n" +"\n" +"Consider reinstalling Multi Theft Auto for your security.\n" +"See online help if MTA does not work correctly." msgstr "" -#: Client/core/CSettings.cpp:800 Client/core/CSettings.cpp:1019 -#: Client/core/CSettings.cpp:1539 Client/core/CSettings.cpp:3154 -msgid "Auto" +#: Client/loader/MainFunctions.cpp:893 +#, c-format +msgid "" +"Data file %s is modified. Possible virus activity.\n" +"\n" +"Consider reinstalling Multi Theft Auto for your security.\n" +"See online help if MTA does not work correctly." msgstr "" -#: Client/core/CSettings.cpp:801 Client/core/CSettings.cpp:1541 -msgid "4:3" +#: Client/loader/MainFunctions.cpp:907 +msgid "" +".asi files are in the 'MTA:SA' or 'GTA: San Andreas' installation " +"directory.\n" +"\n" +"Remove these .asi files if you experience problems with MTA:SA." msgstr "" -#: Client/core/CSettings.cpp:802 Client/core/CSettings.cpp:1543 -msgid "16:10" +#: Client/loader/MainFunctions.cpp:1009 +msgid "" +"File version mismatch error. Reinstall MTA:SA if you experience problems.\n" msgstr "" -#: Client/core/CSettings.cpp:803 Client/core/CSettings.cpp:1545 -msgid "16:9" +#: Client/loader/MainFunctions.cpp:1018 +msgid "Some files are missing. Reinstall MTA:SA if you experience problems.\n" msgstr "" -#: Client/core/CSettings.cpp:806 -msgid "HUD Match Aspect Ratio" +#: Client/loader/MainFunctions.cpp:1030 +msgid "" +"MTA:SA is not compatible with Windows 'Safe Mode'.\n" +"\n" +"Please restart your PC.\n" msgstr "" -#: Client/core/CSettings.cpp:812 -msgid "Volumetric Shadows" +#: Client/loader/MainFunctions.cpp:1123 +msgid "Fix configuration issue" msgstr "" -#: Client/core/CSettings.cpp:816 -msgid "Grass effect" +#. Try to relaunch as admin if not done so already +#: Client/loader/MainFunctions.cpp:1157 +msgid "Fix elevation required error" msgstr "" -#: Client/core/CSettings.cpp:820 -msgid "Heat haze" +#: Client/loader/MainFunctions.cpp:1164 +#, c-format +msgid "" +"Could not start Grand Theft Auto: San Andreas. Please try restarting, or if " +"the problem persists,contact MTA at www.multitheftauto.com. \n" +"\n" +"[%s]" msgstr "" -#: Client/core/CSettings.cpp:824 -msgid "Tyre Smoke etc" +#: Client/loader/MainFunctions.cpp:1219 +msgid "" +"GTA: San Andreas may not have launched correctly. Do you want to terminate " +"it?" msgstr "" -#: Client/core/CSettings.cpp:828 -msgid "Dynamic ped shadows" +#: Client/loader/CInstallManager.cpp:376 +#, c-format +msgid "" +"MTA:SA could not complete the following task:\n" +"\n" +" '%s'\n" msgstr "" -#: Client/core/CSettings.cpp:832 -msgid "Motion blur" +#: Client/loader/CInstallManager.cpp:426 +msgid "" +"** The crash was caused by a graphics driver error **\n" +"\n" +"** Please update your graphics drivers **" msgstr "" -#: Client/core/CSettings.cpp:837 -msgid "Full Screen Minimize" +#: Client/loader/CInstallManager.cpp:532 +msgid "Install updated MTA:SA files" msgstr "" -#: Client/core/CSettings.cpp:849 -msgid "Enable Device Selection Dialog" +#: Client/loader/CInstallManager.cpp:552 +msgid "" +"Could not update due to file conflicts. Please close other applications and " +"retry" msgstr "" -#: Client/core/CSettings.cpp:861 -msgid "Show unsafe resolutions" +#: Client/loader/CInstallManager.cpp:561 +#, c-format +msgid "Multi Theft Auto has not been installed properly, please reinstall. %s" msgstr "" -#: Client/core/CSettings.cpp:873 -msgid "Render vehicles always in high detail" +#: Client/loader/CInstallManager.cpp:613 +msgid "Create GTA:SA junctions" msgstr "" -#: Client/core/CSettings.cpp:877 -msgid "Render peds always in high detail" +#: Client/loader/CInstallManager.cpp:657 +msgid "MTA:SA cannot launch because copying a file failed:" msgstr "" -#: Client/core/CSettings.cpp:881 -msgid "Corona rain reflections" +#: Client/loader/CInstallManager.cpp:663 Client/loader/CInstallManager.cpp:703 +msgid "MTA:SA cannot launch because an MTA:SA file is incorrect or missing:" msgstr "" -#: Client/core/CSettings.cpp:910 -msgid "Enable remote websites" +#: Client/loader/CInstallManager.cpp:672 +msgid "Copy MTA:SA files" msgstr "" -#: Client/core/CSettings.cpp:915 -msgid "Enable Javascript on remote websites" +#: Client/loader/CInstallManager.cpp:695 Client/loader/CInstallManager.cpp:773 +msgid "MTA:SA cannot launch because a GTA:SA file is incorrect or missing:" msgstr "" -#: Client/core/CSettings.cpp:920 -msgid "Custom blacklist" +#: Client/loader/CInstallManager.cpp:780 +msgid "Patch GTA:SA dependency" msgstr "" -#: Client/core/CSettings.cpp:931 Client/core/CSettings.cpp:966 -msgid "Enter a domain e.g. google.com" +#: Client/loader/CInstallManager.cpp:828 +msgid "" +"MTA:SA cannot launch because the GTA:SA executable is incorrect or missing:" msgstr "" -#: Client/core/CSettings.cpp:939 -msgid "Block" +#: Client/loader/CInstallManager.cpp:832 +msgid "" +"Please check your anti-virus for a false-positive detection, try to add an " +"exception for the GTA:SA executable and restart MTA:SA." msgstr "" -#: Client/core/CSettings.cpp:947 Client/core/CSettings.cpp:982 -msgid "Domain" +#: Client/loader/CInstallManager.cpp:838 +msgid "Generate GTA:SA" msgstr "" -#: Client/core/CSettings.cpp:949 Client/core/CSettings.cpp:984 -msgid "Remove domain" +#: Client/loader/CInstallManager.cpp:853 +msgid "MTA:SA cannot launch because the GTA:SA executable is not loadable:" msgstr "" -#. Reset vecTemp -#: Client/core/CSettings.cpp:955 -msgid "Custom whitelist" +#: Client/loader/CInstallManager.cpp:860 Client/loader/CInstallManager.cpp:883 +msgid "Patch GTA:SA" msgstr "" -#. Misc section label -#: Client/core/CSettings.cpp:997 -msgid "Misc" +#: Client/loader/CInstallManager.cpp:876 +msgid "MTA:SA cannot launch because patching GTA:SA has failed:" msgstr "" -#. Fast clothes loading -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1010 -#: Client/core/CSettings.cpp:4803 -msgid "Fast CJ clothes loading:" +#: Client/loader/CInstallManager.cpp:1057 Client/core/CCore.cpp:811 +#, c-format +msgid "MTA:SA cannot continue because drive %s does not have enough space." msgstr "" -#. Browser scan speed -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1024 -#: Client/core/CSettings.cpp:4805 -msgid "Browser speed:" +#: Client/loader/CInstallManager.cpp:1113 +msgid "Missing file:" msgstr "" -#. Single download -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1038 -#: Client/core/CSettings.cpp:4807 -msgid "Single connection:" +#: Client/loader/CInstallManager.cpp:1117 +msgid "If MTA fails to load, please re-install GTA:SA" msgstr "" -#. Packet tag -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1051 -#: Client/core/CSettings.cpp:4809 -msgid "Packet tag:" +#: Client/loader/CInstallManager.cpp:1152 +msgid "Update install settings" msgstr "" -#. Progress animation -#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1064 -#: Client/core/CSettings.cpp:4811 -msgid "Progress animation:" +#: Client/loader/CInstallManager.cpp:1305 +msgid "Update compatibility settings" msgstr "" -#. Process priority -#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1077 -#: Client/core/CSettings.cpp:4801 -msgid "Process priority:" +#: Client/core/CVersionUpdater.cpp:626 +msgid "Busy" msgstr "" -#. Debug setting -#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1091 -#: Client/core/CSettings.cpp:4813 -msgid "Debug setting:" +#: Client/core/CVersionUpdater.cpp:626 +msgid "Can't check for updates right now" msgstr "" -#. Streaming memory -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1114 -#: Client/core/CSettings.cpp:4815 -msgid "Streaming memory:" +#: Client/core/CVersionUpdater.cpp:1567 Client/core/CVersionUpdater.cpp:1587 +#: Client/core/CVersionUpdater.cpp:1605 +#, c-format +msgid "MTA:SA %s required" msgstr "" -#. Update build type -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1215 -msgid "Update build type:" +#: Client/core/CVersionUpdater.cpp:1568 +#, c-format +msgid "" +"An updated version of MTA:SA %s is required to join the selected server.\n" +"\n" +"Do you want to download and install MTA:SA %s ?" msgstr "" -#. UpdateAutoInstall -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1194 -msgid "Install important updates:" +#: Client/core/CVersionUpdater.cpp:1588 +#, c-format +msgid "Do you want to launch MTA:SA %s and connect to this server ?" 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 -msgid "On" +#: Client/core/CVersionUpdater.cpp:1606 +msgid "" +"It is not possible to connect at this time.\n" +"\n" +"Please try later." msgstr "" -#: Client/core/CSettings.cpp:1031 Client/core/CSettings.cpp:3161 -msgid "Very slow" +#: Client/core/CVersionUpdater.cpp:1788 +msgid "Connecting" 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 -msgid "Default" +#: Client/core/CVersionUpdater.cpp:1789 Client/core/CVersionUpdater.cpp:1805 +msgid "Please wait..." msgstr "" -#: Client/core/CSettings.cpp:1033 Client/core/CSettings.cpp:3165 -msgid "Fast" +#: Client/core/CVersionUpdater.cpp:1804 +msgid "CHECKING" msgstr "" -#: Client/core/CSettings.cpp:1084 Client/core/CSettings.cpp:3141 -msgid "Normal" +#: Client/core/CVersionUpdater.cpp:1821 Client/core/CVersionUpdater.cpp:1914 +msgid "UPDATE CHECK" msgstr "" -#: Client/core/CSettings.cpp:1085 Client/core/CSettings.cpp:3143 -msgid "Above normal" +#: Client/core/CVersionUpdater.cpp:1822 +msgid "No update needed" msgstr "" -#: Client/core/CSettings.cpp:1121 -msgid "Min" +#: Client/core/CVersionUpdater.cpp:1839 +msgid "DOWNLOADING" msgstr "" -#: Client/core/CSettings.cpp:1134 -msgid "Max" +#: Client/core/CVersionUpdater.cpp:1840 +msgid "waiting..." msgstr "" -#. Windows 8 compatibility -#: Client/core/CSettings.cpp:1141 -msgid "Windows 8 compatibility:" +#: Client/core/CVersionUpdater.cpp:1856 +msgid "MANDATORY UPDATE" msgstr "" -#: Client/core/CSettings.cpp:1145 -msgid "16-bit color" +#: Client/core/CVersionUpdater.cpp:1857 +msgid "" +"To join this server, you must update MTA.\n" +"\n" +" Do you want to update now ?" msgstr "" -#: Client/core/CSettings.cpp:1150 -msgid "Mouse fix" +#: Client/core/CVersionUpdater.cpp:1875 +msgid "OPTIONAL UPDATE" msgstr "" -#. Cache path info -#: Client/core/CSettings.cpp:1168 -msgid "Client resource files:" +#: Client/core/CVersionUpdater.cpp:1876 +msgid "" +"Server says an update is recommended, but not essential.\n" +"\n" +" Do you want to update now ?" msgstr "" -#: Client/core/CSettings.cpp:1172 -msgid "Show in Explorer" +#: Client/core/CVersionUpdater.cpp:1915 +msgid "" +"An update is currently not available.\n" +"\n" +"Please check www.mtasa.com" msgstr "" -#. Auto updater section label -#: Client/core/CSettings.cpp:1187 Client/core/CSettings.cpp:1190 -msgid "Auto updater" +#: Client/core/CVersionUpdater.cpp:1936 Client/core/CVersionUpdater.cpp:2118 +msgid "ERROR SAVING" msgstr "" -#. Check for updates -#: Client/core/CSettings.cpp:1228 -msgid "Check for update now" +#: Client/core/CVersionUpdater.cpp:1937 Client/core/CVersionUpdater.cpp:2119 +msgid "Unable to create the file." msgstr "" -#: Client/core/CSettings.cpp:1382 -msgid "Some settings will be changed when you next start MTA" +#: Client/core/CVersionUpdater.cpp:1945 Client/core/CVersionUpdater.cpp:1954 +#: Client/core/CVersionUpdater.cpp:2127 Client/core/CVersionUpdater.cpp:2136 +msgid "ERROR DOWNLOADING" msgstr "" -#: Client/core/CSettings.cpp:1383 -msgid "" -"\n" -"\n" -"Do you want to restart now?" +#: Client/core/CVersionUpdater.cpp:1946 Client/core/CVersionUpdater.cpp:2128 +msgid "The downloaded file appears to be incorrect." msgstr "" -#: Client/core/CSettings.cpp:1386 -msgid "RESTART REQUIRED" +#: Client/core/CVersionUpdater.cpp:1955 Client/core/CVersionUpdater.cpp:2137 +msgid "For some reason." msgstr "" -#: 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/CQuestionBox.cpp:194 Client/core/CMainMenu.cpp:1199 -#: Client/core/CVersionUpdater.cpp:1571 Client/core/CVersionUpdater.cpp:1589 -#: Client/core/CVersionUpdater.cpp:1858 Client/core/CVersionUpdater.cpp:1877 -#: Client/core/ServerBrowser/CServerInfo.cpp:479 Client/loader/Dialogs.cpp:132 -msgid "No" +#: Client/core/CVersionUpdater.cpp:1966 Client/core/CVersionUpdater.cpp:2150 +msgid "DOWNLOAD COMPLETE" msgstr "" -#. ///////////////////////////////////////////////////////////////////////// -#. -#. Dialog strings -#. -#. -#. ///////////////////////////////////////////////////////////////////////// -#: 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/CQuestionBox.cpp:195 Client/core/CMainMenu.cpp:1200 -#: Client/core/CVersionUpdater.cpp:1572 Client/core/CVersionUpdater.cpp:1590 -#: Client/core/CVersionUpdater.cpp:1859 Client/core/CVersionUpdater.cpp:1878 -#: Client/core/ServerBrowser/CServerInfo.cpp:479 Client/loader/Dialogs.cpp:131 -#: Client/gui/CGUIMessageBox_Impl.cpp:72 -msgid "Yes" +#: Client/core/CVersionUpdater.cpp:1990 +msgid " - Unknown problem in _DialogUpdateResult" msgstr "" -#: Client/core/CSettings.cpp:1406 -msgid "Some settings will be changed when you disconnect the current server" +#: Client/core/CVersionUpdater.cpp:2081 Client/core/CSettings.cpp:4628 +msgid "CUSTOMIZED GTA:SA FILES" msgstr "" -#: Client/core/CSettings.cpp:1407 +#: Client/core/CVersionUpdater.cpp:2088 Client/core/CVersionUpdater.cpp:2098 +msgid "Ok" +msgstr "" + +#: Client/core/CVersionUpdater.cpp:2096 +msgid "ERROR" +msgstr "" + +#: Client/core/CVersionUpdater.cpp:2097 msgid "" +"Some MTA:SA data files are missing.\n" "\n" "\n" -"Do you want to disconnect now?" +"Please reinstall MTA:SA" msgstr "" -#: Client/core/CSettings.cpp:1410 -msgid "DISCONNECT REQUIRED" +#: Client/core/CVersionUpdater.cpp:2774 +#, c-format +msgid "%3d %% completed" msgstr "" -#. Update the joystick name -#: Client/core/CSettings.cpp:1737 -msgid "Joypad not detected - Check connections and restart game" +#: Client/core/CVersionUpdater.cpp:2777 +#, c-format +msgid "" +"\n" +"\n" +"Waiting for response - %-3d" msgstr "" -#: Client/core/CSettings.cpp:1932 -msgid "Binding axis" +#: Client/core/CKeyBinds.cpp:186 +msgid "Fire" msgstr "" -#: Client/core/CSettings.cpp:1932 -msgid "Move an axis to bind, or escape to clear" +#: Client/core/CKeyBinds.cpp:187 +msgid "Next weapon" msgstr "" -#: Client/core/CSettings.cpp:2009 -msgid "Language:" +#: Client/core/CKeyBinds.cpp:188 +msgid "Previous weapon" msgstr "" -#: Client/core/CSettings.cpp:2009 -msgid "Skin:" +#: Client/core/CKeyBinds.cpp:189 +msgid "Forwards" msgstr "" -#: Client/core/CSettings.cpp:2009 -msgid "Presets:" +#: Client/core/CKeyBinds.cpp:190 +msgid "Backwards" msgstr "" -#: Client/core/CSettings.cpp:2058 -msgid "Chat" +#: Client/core/CKeyBinds.cpp:191 Client/core/CSettings.cpp:2265 +#: Client/core/CSettings.cpp:2293 +msgid "Left" msgstr "" -#: Client/core/CSettings.cpp:2075 -msgid "Load" +#: Client/core/CKeyBinds.cpp:192 Client/core/CSettings.cpp:2267 +#: Client/core/CSettings.cpp:2294 +msgid "Right" msgstr "" -#: Client/core/CSettings.cpp:2087 -msgid "Colors" +#: Client/core/CKeyBinds.cpp:193 +msgid "Zoom in" msgstr "" -#: Client/core/CSettings.cpp:2088 -msgid "Layout" +#: Client/core/CKeyBinds.cpp:194 +msgid "Zoom out" msgstr "" -#: Client/core/CSettings.cpp:2089 Client/core/CSettings.cpp:2335 -msgid "Options" +#: Client/core/CKeyBinds.cpp:195 +msgid "Enter/Exit" msgstr "" -#: Client/core/CSettings.cpp:2095 -msgid "Chat Background" +#: Client/core/CKeyBinds.cpp:196 +msgid "Change camera" msgstr "" -#: Client/core/CSettings.cpp:2095 -msgid "Chat Text" +#. 10 +#: Client/core/CKeyBinds.cpp:197 +msgid "Jump" msgstr "" -#: Client/core/CSettings.cpp:2095 -msgid "Input Background" +#: Client/core/CKeyBinds.cpp:198 +msgid "Sprint" msgstr "" -#: Client/core/CSettings.cpp:2095 -msgid "Input Text" +#: Client/core/CKeyBinds.cpp:199 +msgid "Look behind" msgstr "" -#: Client/core/CSettings.cpp:2118 -msgid "Lines:" +#: Client/core/CKeyBinds.cpp:200 +msgid "Crouch" msgstr "" -#: Client/core/CSettings.cpp:2118 -msgid "Scale:" +#: Client/core/CKeyBinds.cpp:201 +msgid "Action" msgstr "" -#: Client/core/CSettings.cpp:2118 -msgid "Width:" +#: Client/core/CKeyBinds.cpp:202 +msgid "Walk" msgstr "" -#: Client/core/CSettings.cpp:2121 -msgid "Size" +#: Client/core/CKeyBinds.cpp:203 +msgid "Vehicle fire" msgstr "" -#: Client/core/CSettings.cpp:2170 -msgid "after" +#: Client/core/CKeyBinds.cpp:204 +msgid "Vehicle secondary fire" msgstr "" -#: Client/core/CSettings.cpp:2170 -msgid "for" -msgstr "" - -#: Client/core/CSettings.cpp:2170 -msgid "sec" -msgstr "" - -#: Client/core/CSettings.cpp:2173 -msgid "Fading" -msgstr "" - -#: Client/core/CSettings.cpp:2179 -msgid "Fade out old lines" -msgstr "" - -#: Client/core/CSettings.cpp:2219 -msgid "Horizontal:" +#: Client/core/CKeyBinds.cpp:205 +msgid "Vehicle left" msgstr "" -#: Client/core/CSettings.cpp:2219 -msgid "Vertical:" +#: Client/core/CKeyBinds.cpp:206 +msgid "Vehicle right" msgstr "" -#: Client/core/CSettings.cpp:2219 -msgid "Text-Align:" +#. 20 +#: Client/core/CKeyBinds.cpp:207 +msgid "Steer forwards/down" msgstr "" -#: Client/core/CSettings.cpp:2219 -msgid "X-Offset:" +#: Client/core/CKeyBinds.cpp:208 +msgid "Steer backwards/up" msgstr "" -#: Client/core/CSettings.cpp:2220 -msgid "Y-Offset:" +#: Client/core/CKeyBinds.cpp:209 +msgid "Accelerate" msgstr "" -#: Client/core/CSettings.cpp:2226 -msgid "Position" +#: Client/core/CKeyBinds.cpp:210 +msgid "Brake/Reverse" msgstr "" -#: Client/core/CSettings.cpp:2240 Client/core/CSettings.cpp:2268 -#: Client/core/CKeyBinds.cpp:191 -msgid "Left" +#: Client/core/CKeyBinds.cpp:211 +msgid "Radio next" msgstr "" -#: Client/core/CSettings.cpp:2241 Client/core/CSettings.cpp:2255 -msgid "Center" +#: Client/core/CKeyBinds.cpp:212 +msgid "Radio previous" msgstr "" -#: Client/core/CSettings.cpp:2242 Client/core/CSettings.cpp:2269 -#: Client/core/CKeyBinds.cpp:192 -msgid "Right" +#: Client/core/CKeyBinds.cpp:213 +msgid "Radio user track skip" msgstr "" -#: Client/core/CSettings.cpp:2254 -msgid "Top" +#: Client/core/CKeyBinds.cpp:214 +msgid "Horn" msgstr "" -#: Client/core/CSettings.cpp:2256 -msgid "Bottom" +#: Client/core/CKeyBinds.cpp:215 +msgid "Sub-mission" msgstr "" -#: Client/core/CSettings.cpp:2304 -msgid "Font" +#: Client/core/CKeyBinds.cpp:216 +msgid "Handbrake" msgstr "" -#: Client/core/CSettings.cpp:2341 -msgid "Hide background when not typing" +#. 30 +#: Client/core/CKeyBinds.cpp:217 +msgid "Vehicle look left" msgstr "" -#: Client/core/CSettings.cpp:2346 -msgid "Nickname completion using the \"Tab\" key" +#: Client/core/CKeyBinds.cpp:218 +msgid "Vehicle look right" msgstr "" -#: Client/core/CSettings.cpp:2351 -msgid "Allow server to flash the window" +#: Client/core/CKeyBinds.cpp:219 +msgid "Vehicle look behind" msgstr "" -#: Client/core/CSettings.cpp:2356 -msgid "Allow tray balloon notifications" +#: Client/core/CKeyBinds.cpp:220 +msgid "Vehicle mouse look" msgstr "" -#: Client/core/CSettings.cpp:2361 -msgid "Chat text black/white outline" +#: Client/core/CKeyBinds.cpp:221 +msgid "Special control left" msgstr "" -#. Create a messagebox to notify the user -#. 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 -msgid "Press a key to bind, or escape to clear" +#: Client/core/CKeyBinds.cpp:222 +msgid "Special control right" msgstr "" -#: Client/core/CSettings.cpp:2611 -msgid "Binding a primary key" +#: Client/core/CKeyBinds.cpp:223 +msgid "Special control down" msgstr "" -#: Client/core/CSettings.cpp:2618 -msgid "Binding a secondary key" +#: Client/core/CKeyBinds.cpp:224 +msgid "Special control up" msgstr "" -#: Client/core/CSettings.cpp:2694 -msgid "GTA GAME CONTROLS" +#: Client/core/CKeyBinds.cpp:225 +msgid "Aim weapon" msgstr "" -#: Client/core/CSettings.cpp:2696 -msgid "MULTIPLAYER CONTROLS" +#: Client/core/CKeyBinds.cpp:226 +msgid "Conversation yes" msgstr "" -#: Client/core/CSettings.cpp:2941 Client/core/CSettings.cpp:4764 -msgid "Your nickname contains invalid characters!" +#. 40 +#: Client/core/CKeyBinds.cpp:227 +msgid "Conversation no" msgstr "" -#: Client/core/CSettings.cpp:3778 -msgid "Red:" +#: Client/core/CKeyBinds.cpp:228 +msgid "Group control forwards" msgstr "" -#: Client/core/CSettings.cpp:3778 -msgid "Green:" +#: Client/core/CKeyBinds.cpp:229 +msgid "Group control backwards" msgstr "" -#: Client/core/CSettings.cpp:3778 -msgid "Blue:" +#: Client/core/CScreenShot.cpp:104 +#, c-format +msgid "Screenshot got %d bytes, but expected %d" msgstr "" -#: Client/core/CSettings.cpp:3778 -msgid "Transparency:" +#: Client/core/CScreenShot.cpp:110 +msgid "Screenshot failed" msgstr "" -#: Client/core/CSettings.cpp:3781 -msgid "Color" +#: Client/core/CScreenShot.cpp:160 +#, c-format +msgid "Screenshot taken: '%s'" msgstr "" -#: Client/core/CSettings.cpp:3858 -msgid "Preview" +#: Client/core/CCommandFuncs.cpp:24 +msgid "***[ COMMAND HELP ]***\n" msgstr "" -#: Client/core/CSettings.cpp:4166 -msgid "Please disconnect before changing language" +#: Client/core/CCommandFuncs.cpp:158 +#, c-format +msgid "* The time is %d:%02d:%02d" msgstr "" -#: Client/core/CSettings.cpp:4194 -msgid "Please disconnect before changing skin" +#: Client/core/CCommandFuncs.cpp:242 +msgid "connect: Syntax is 'connect [ ]'" msgstr "" -#: Client/core/CSettings.cpp:4482 -msgid "" -"Volmetric shadows can cause some systems to slow down.\n" -"\n" -"Are you sure you want to enable them?" +#: Client/core/CCommandFuncs.cpp:250 Client/core/CCommandFuncs.cpp:318 +msgid "connect: Bad port number" msgstr "" -#: Client/core/CSettings.cpp:4486 -msgid "PERFORMANCE WARNING" +#: Client/core/CCommandFuncs.cpp:272 Client/core/CCommandFuncs.cpp:333 +#, c-format +msgid "connect: Connecting to %s:%u..." msgstr "" -#: Client/core/CSettings.cpp:4506 -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" +#: Client/core/CCommandFuncs.cpp:276 Client/core/CCommandFuncs.cpp:337 +#, c-format +msgid "connect: could not connect to %s:%u!" msgstr "" -#: Client/core/CSettings.cpp:4508 -msgid "SCREEN UPLOAD INFORMATION" +#: Client/core/CCommandFuncs.cpp:281 +msgid "connect: Failed to unload current mod" msgstr "" -#: Client/core/CSettings.cpp:4523 -msgid "" -"Some scripts may play sounds, such as radio, from the internet.\n" -"\n" -"Disabling this setting may decrease network\n" -"bandwidth consumption.\n" +#: Client/core/CCommandFuncs.cpp:371 +msgid "Bound all controls from GTA" msgstr "" -#: Client/core/CSettings.cpp:4526 -msgid "EXTERNAL SOUNDS" +#: Client/core/CCommandFuncs.cpp:385 +msgid "Saved configuration file" msgstr "" -#: Client/core/CSettings.cpp:4555 -msgid "" -"It seems that you have the Rich Presence connection option enabled.\n" -"Do you want to allow servers to share their data?\n" -"\n" -"This includes yours unique ID identifier." +#. Print it +#: Client/core/CCommandFuncs.cpp:451 +#, c-format +msgid "* Your serial is: %s" msgstr "" -#: Client/core/CSettings.cpp:4560 -msgid "CONSENT TO ALLOW DATA SHARING" +#. Create the window +#: Client/core/CNewsBrowser.cpp:153 +msgid "NEWS" msgstr "" -#: Client/core/CSettings.cpp:4584 -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" -"\n" -"However, CUSTOMIZED GTA:SA FILES ARE BLOCKED BY MANY SERVERS\n" -"\n" -"Are you sure you want to use them?" +#. News link +#: Client/core/CNewsBrowser.cpp:171 Client/core/CNewsBrowser.cpp:172 +msgid "Visit latest news article" msgstr "" -#: Client/core/CSettings.cpp:4590 Client/core/CVersionUpdater.cpp:2081 -msgid "CUSTOMIZED GTA:SA FILES" +#: Client/core/CQuestionBox.cpp:192 Shared/sdk/SharedUtil.Misc.hpp:688 +msgid "Do you want to see some on-line help about this problem ?" msgstr "" -#: Client/core/CSettings.cpp:4633 -msgid "" -"Enabling DPI awareness is an experimental feature and\n" -"we only recommend it when you play MTA:SA on a scaled monitor.\n" -"You may experience graphical issues if you enable this option.\n" -"\n" -"Are you sure you want to enable this option?" +#: Client/core/CJoystickManager.cpp:1578 +msgid "Accelerate Axis" msgstr "" -#: Client/core/CSettings.cpp:4639 -msgid "EXPERIMENTAL FEATURE" +#: Client/core/CJoystickManager.cpp:1580 +msgid "Brake Axis" msgstr "" -#: Client/core/CSettings.cpp:4782 -msgid "Please enter a nickname" +#. TRANSLATORS: Replace with your language native name +#: Client/core/CLocalization.cpp:16 +msgid "English" msgstr "" -#: Client/core/CSettings.cpp:4783 +#. Even the default skin doesn't work, so give up +#: Client/core/CGUI.cpp:92 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 -msgid "Very experimental feature." -msgstr "" - -#: Client/core/CSettings.cpp:4803 -msgid "Stops stalls with CJ variations (Uses 65MB more RAM)" -msgstr "" - -#: Client/core/CSettings.cpp:4805 -msgid "Older routers may require a slower scan speed." -msgstr "" - -#: Client/core/CSettings.cpp:4807 -msgid "Switch on to use only one connection when downloading." +"The skin you selected could not be loaded, and the default skin also could " +"not be loaded, please reinstall MTA." msgstr "" -#: Client/core/CSettings.cpp:4809 -msgid "Tag network packets to help ISPs identify MTA traffic." +#. Unknown command +#: Client/core/CCommands.cpp:223 +msgid "Unknown command or cvar: " msgstr "" -#: Client/core/CSettings.cpp:4811 -msgid "Spinning circle animation at the bottom of the screen" +#: Client/core/CCredits.cpp:34 +msgid "Programming" msgstr "" -#: Client/core/CSettings.cpp:4813 -msgid "Select default always. (This setting is not saved)" +#: Client/core/CCredits.cpp:63 +msgid "Contributors" msgstr "" -#: Client/core/CSettings.cpp:4815 -msgid "Maximum is usually best" +#: Client/core/CCredits.cpp:84 +msgid "Game Design / Scripting" msgstr "" -#: Client/core/CSettings.cpp:4817 Client/core/CSettings.cpp:4819 -msgid "Auto updater:" +#: Client/core/CCredits.cpp:104 +msgid "Language Localization" msgstr "" -#: Client/core/CSettings.cpp:4817 -msgid "Select default unless you like filling out bug reports." +#: Client/core/CCredits.cpp:110 +msgid "Patch contributors" msgstr "" -#: Client/core/CSettings.cpp:4819 -msgid "Select default to automatically install important updates." +#: Client/core/CCredits.cpp:234 +msgid "Special Thanks" msgstr "" -#: Client/core/CSettings.cpp:4821 -msgid "16-bit color:" +#: Client/core/CCredits.cpp:265 +msgid "" +"This software and project makes use of the following libraries and software:" msgstr "" -#: Client/core/CSettings.cpp:4821 -msgid "Enable 16 bit color modes - Requires MTA restart" +#: Client/core/CMainMenu.cpp:333 +msgid "" +"You are using a feature-branch build! This is a test build only which cannot " +"be used to connect to public servers!" msgstr "" -#: Client/core/CSettings.cpp:4823 -msgid "Mouse fix:" +#: Client/core/CMainMenu.cpp:352 +msgid "" +"MTA will not receive updates on XP/Vista after July 2019.\n" +"\n" +"Upgrade Windows to play on the latest servers." msgstr "" -#: Client/core/CSettings.cpp:4823 -msgid "Mouse movement fix - May need PC restart" +#: Client/core/CMainMenu.cpp:1193 +msgid "" +"This will disconnect you from the current server.\n" +"\n" +"Are you sure you want to disconnect?" msgstr "" -#: Client/core/CCore.cpp:811 Client/loader/CInstallManager.cpp:1057 -#, c-format -msgid "MTA:SA cannot continue because drive %s does not have enough space." +#: Client/core/CMainMenu.cpp:1197 +msgid "DISCONNECT WARNING" msgstr "" #: Client/core/CCore.cpp:813 Shared/mods/deathmatch/logic/Utils.cpp:129 @@ -1813,1472 +1922,1408 @@ 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 "" -#: Client/core/CConnectManager.cpp:79 -msgid "Connecting failed. Invalid nick provided!" +#. Create window (with frame) if it will fit inside the screen resolution +#: Client/core/CSettings.cpp:84 +msgid "SETTINGS" msgstr "" -#: Client/core/CConnectManager.cpp:110 -msgid "Connecting failed. Invalid host provided!" +#: Client/core/CSettings.cpp:116 +msgid "Multiplayer" msgstr "" -#: Client/core/CConnectManager.cpp:126 -#, c-format -msgid "Connecting to %s at port %u failed!" +#: Client/core/CSettings.cpp:117 +msgid "Video" msgstr "" -#. Display the status box -#: Client/core/CConnectManager.cpp:147 -#, c-format -msgid "Connecting to %s:%u ..." +#: Client/core/CSettings.cpp:118 +msgid "Audio" msgstr "" -#. Failed loading the mod -#: Client/core/CConnectManager.cpp:403 -#, c-format -msgid "No such mod installed (%s)" +#: Client/core/CSettings.cpp:119 +msgid "Binds" msgstr "" -#: Client/core/CConnectManager.cpp:411 -msgid "Bad server response (2)" +#: Client/core/CSettings.cpp:120 +msgid "Controls" msgstr "" -#: Client/core/CConnectManager.cpp:421 -msgid "Bad server response (1)" +#: Client/core/CSettings.cpp:121 +msgid "Interface" msgstr "" -#: Client/core/CKeyBinds.cpp:186 -msgid "Fire" +#: Client/core/CSettings.cpp:122 +msgid "Web Browser" msgstr "" -#: Client/core/CKeyBinds.cpp:187 -msgid "Next weapon" +#: Client/core/CSettings.cpp:123 +msgid "Advanced" msgstr "" -#: Client/core/CKeyBinds.cpp:188 -msgid "Previous weapon" +#: Client/core/CSettings.cpp:147 Client/core/CSettings.cpp:338 +#: Client/core/CSettings.cpp:633 Client/core/CSettings.cpp:902 +msgid "Load defaults" msgstr "" -#: Client/core/CKeyBinds.cpp:189 -msgid "Forwards" +#. * +#. * Controls tab +#. * +#: Client/core/CSettings.cpp:157 Client/core/CSettings.cpp:181 +msgid "Mouse sensitivity:" msgstr "" -#: Client/core/CKeyBinds.cpp:190 -msgid "Backwards" +#. VerticalAimSensitivity +#: Client/core/CSettings.cpp:157 Client/core/CSettings.cpp:199 +msgid "Vertical aim sensitivity:" msgstr "" -#: Client/core/CKeyBinds.cpp:193 -msgid "Zoom in" +#. Mouse Options +#: Client/core/CSettings.cpp:160 +msgid "Mouse options" msgstr "" -#: Client/core/CKeyBinds.cpp:194 -msgid "Zoom out" +#: Client/core/CSettings.cpp:167 +msgid "Invert mouse vertically" msgstr "" -#: Client/core/CKeyBinds.cpp:195 -msgid "Enter/Exit" +#: Client/core/CSettings.cpp:171 +msgid "Steer with mouse" msgstr "" -#: Client/core/CKeyBinds.cpp:196 -msgid "Change camera" +#: Client/core/CSettings.cpp:175 +msgid "Fly with mouse" msgstr "" -#. 10 -#: Client/core/CKeyBinds.cpp:197 -msgid "Jump" +#. Joypad options +#: Client/core/CSettings.cpp:217 +msgid "Joypad options" msgstr "" -#: Client/core/CKeyBinds.cpp:198 -msgid "Sprint" +#: Client/core/CSettings.cpp:230 +msgid "Standard controls (Mouse + Keyboard)" msgstr "" -#: Client/core/CKeyBinds.cpp:199 -msgid "Look behind" +#: Client/core/CSettings.cpp:237 +msgid "Classic controls (Joypad)" msgstr "" -#: Client/core/CKeyBinds.cpp:200 -msgid "Crouch" +#: Client/core/CSettings.cpp:274 +msgid "Dead Zone" msgstr "" -#: Client/core/CKeyBinds.cpp:201 -msgid "Action" +#: Client/core/CSettings.cpp:279 +msgid "Saturation" msgstr "" -#: Client/core/CKeyBinds.cpp:202 -msgid "Walk" +#: Client/core/CSettings.cpp:285 +msgid "Use the 'Binds' tab for joypad buttons." msgstr "" -#: Client/core/CKeyBinds.cpp:203 -msgid "Vehicle fire" +#: Client/core/CSettings.cpp:324 +msgid "Left Stick" msgstr "" -#: Client/core/CKeyBinds.cpp:204 -msgid "Vehicle secondary fire" +#: Client/core/CSettings.cpp:330 +msgid "Right Stick" msgstr "" -#: Client/core/CKeyBinds.cpp:205 -msgid "Vehicle left" +#: Client/core/CSettings.cpp:345 +msgid "DESCRIPTION" msgstr "" -#: Client/core/CKeyBinds.cpp:206 -msgid "Vehicle right" +#: Client/core/CSettings.cpp:346 +msgid "KEY" msgstr "" -#. 20 -#: Client/core/CKeyBinds.cpp:207 -msgid "Steer forwards/down" +#: Client/core/CSettings.cpp:348 +msgid "ALT. KEY" msgstr "" -#: Client/core/CKeyBinds.cpp:208 -msgid "Steer backwards/up" +#. * +#. * Multiplayer tab +#. * +#: Client/core/CSettings.cpp:353 Client/core/CSettings.cpp:356 +msgid "Nick:" msgstr "" -#: Client/core/CKeyBinds.cpp:209 -msgid "Accelerate" +#: Client/core/CSettings.cpp:378 +msgid "Save server passwords" msgstr "" -#: Client/core/CKeyBinds.cpp:210 -msgid "Brake/Reverse" +#: Client/core/CSettings.cpp:383 +msgid "Auto-refresh server browser" msgstr "" -#: Client/core/CKeyBinds.cpp:211 -msgid "Radio next" +#: Client/core/CSettings.cpp:388 +msgid "Allow screen upload" msgstr "" -#: Client/core/CKeyBinds.cpp:212 -msgid "Radio previous" +#: Client/core/CSettings.cpp:393 +msgid "Allow external sounds" msgstr "" -#: Client/core/CKeyBinds.cpp:213 -msgid "Radio user track skip" +#: Client/core/CSettings.cpp:398 +msgid "Always show download window" msgstr "" -#: Client/core/CKeyBinds.cpp:214 -msgid "Horn" +#: Client/core/CSettings.cpp:403 +msgid "Allow connecting with Discord Rich Presence" msgstr "" -#: Client/core/CKeyBinds.cpp:215 -msgid "Sub-mission" +#: Client/core/CSettings.cpp:408 +msgid "Use customized GTA:SA files" msgstr "" -#: Client/core/CKeyBinds.cpp:216 -msgid "Handbrake" +#: Client/core/CSettings.cpp:413 +msgid "Map rendering options" msgstr "" -#. 30 -#: Client/core/CKeyBinds.cpp:217 -msgid "Vehicle look left" +#: Client/core/CSettings.cpp:421 +msgid "Opacity:" msgstr "" -#: Client/core/CKeyBinds.cpp:218 -msgid "Vehicle look right" +#: Client/core/CSettings.cpp:441 +msgid "Image resolution:" msgstr "" -#: Client/core/CKeyBinds.cpp:219 -msgid "Vehicle look behind" +#: Client/core/CSettings.cpp:448 +msgid "1024 x 1024 (Default)" msgstr "" -#: Client/core/CKeyBinds.cpp:220 -msgid "Vehicle mouse look" +#. index 0 +#: Client/core/CSettings.cpp:449 +msgid "2048 x 2048" msgstr "" -#: Client/core/CKeyBinds.cpp:221 -msgid "Special control left" +#. * +#. * Audio tab +#. * +#: Client/core/CSettings.cpp:455 Client/core/CSettings.cpp:464 +msgid "Master volume:" msgstr "" -#: Client/core/CKeyBinds.cpp:222 -msgid "Special control right" +#: Client/core/CSettings.cpp:455 Client/core/CSettings.cpp:483 +msgid "Radio volume:" msgstr "" -#: Client/core/CKeyBinds.cpp:223 -msgid "Special control down" +#: Client/core/CSettings.cpp:455 Client/core/CSettings.cpp:502 +msgid "SFX volume:" msgstr "" -#: Client/core/CKeyBinds.cpp:224 -msgid "Special control up" +#: Client/core/CSettings.cpp:455 Client/core/CSettings.cpp:521 +msgid "MTA volume:" msgstr "" -#: Client/core/CKeyBinds.cpp:225 -msgid "Aim weapon" +#: Client/core/CSettings.cpp:456 Client/core/CSettings.cpp:540 +msgid "Voice volume:" msgstr "" -#: Client/core/CKeyBinds.cpp:226 -msgid "Conversation yes" +#: Client/core/CSettings.cpp:456 Client/core/CSettings.cpp:581 +msgid "Play mode:" msgstr "" -#. 40 -#: Client/core/CKeyBinds.cpp:227 -msgid "Conversation no" +#: Client/core/CSettings.cpp:559 +msgid "Radio options" msgstr "" -#: Client/core/CKeyBinds.cpp:228 -msgid "Group control forwards" +#: Client/core/CSettings.cpp:565 +msgid "Radio Equalizer" msgstr "" -#: Client/core/CKeyBinds.cpp:229 -msgid "Group control backwards" +#: Client/core/CSettings.cpp:570 +msgid "Radio Auto-tune" msgstr "" -#. Even the default skin doesn't work, so give up -#: Client/core/CGUI.cpp:86 -msgid "" -"The skin you selected could not be loaded, and the default skin also could " -"not be loaded, please reinstall MTA." +#: Client/core/CSettings.cpp:575 +msgid "Usertrack options" msgstr "" -#. Create the window -#: Client/core/CNewsBrowser.cpp:153 -msgid "NEWS" +#: Client/core/CSettings.cpp:589 Client/core/CSettings.cpp:3112 +msgid "Radio" msgstr "" -#. News link -#: Client/core/CNewsBrowser.cpp:171 Client/core/CNewsBrowser.cpp:172 -msgid "Visit latest news article" +#: Client/core/CSettings.cpp:590 Client/core/CSettings.cpp:3114 +msgid "Random" msgstr "" -#: Client/core/CCommandFuncs.cpp:24 -msgid "***[ COMMAND HELP ]***\n" +#: Client/core/CSettings.cpp:591 Client/core/CSettings.cpp:3116 +msgid "Sequential" msgstr "" -#: Client/core/CCommandFuncs.cpp:158 -#, c-format -msgid "* The time is %d:%02d:%02d" +#: Client/core/CSettings.cpp:594 +msgid "Automatic Media Scan" msgstr "" -#: Client/core/CCommandFuncs.cpp:242 -msgid "connect: Syntax is 'connect [ ]'" +#: Client/core/CSettings.cpp:601 +msgid "Mute options" msgstr "" -#: Client/core/CCommandFuncs.cpp:250 Client/core/CCommandFuncs.cpp:318 -msgid "connect: Bad port number" +#: Client/core/CSettings.cpp:607 +msgid "Mute All sounds when minimized" msgstr "" -#: Client/core/CCommandFuncs.cpp:272 Client/core/CCommandFuncs.cpp:333 -#, c-format -msgid "connect: Connecting to %s:%u..." +#: Client/core/CSettings.cpp:612 +msgid "Mute Radio sounds when minimized" msgstr "" -#: Client/core/CCommandFuncs.cpp:276 Client/core/CCommandFuncs.cpp:337 -#, c-format -msgid "connect: could not connect to %s:%u!" +#: Client/core/CSettings.cpp:617 +msgid "Mute SFX sounds when minimized" msgstr "" -#: Client/core/CCommandFuncs.cpp:281 -msgid "connect: Failed to unload current mod" +#: Client/core/CSettings.cpp:622 +msgid "Mute MTA sounds when minimized" msgstr "" -#: Client/core/CCommandFuncs.cpp:371 -msgid "Bound all controls from GTA" +#: Client/core/CSettings.cpp:627 +msgid "Mute Voice sounds when minimized" msgstr "" -#: Client/core/CCommandFuncs.cpp:385 -msgid "Saved configuration file" +#. * +#. * Video tab +#. * +#: Client/core/CSettings.cpp:643 Client/core/CSettings.cpp:649 +msgid "Resolution:" msgstr "" -#. Print it -#: Client/core/CCommandFuncs.cpp:451 -#, c-format -msgid "* Your serial is: %s" +#: Client/core/CSettings.cpp:643 Client/core/CSettings.cpp:696 +msgid "FOV:" msgstr "" -#. Unknown command -#: Client/core/CCommands.cpp:223 -msgid "Unknown command or cvar: " +#: Client/core/CSettings.cpp:643 Client/core/CSettings.cpp:712 +msgid "Draw Distance:" msgstr "" -#: Client/core/CQuestionBox.cpp:192 Shared/sdk/SharedUtil.Misc.hpp:688 -msgid "Do you want to see some on-line help about this problem ?" +#: Client/core/CSettings.cpp:643 Client/core/CSettings.cpp:730 +msgid "Brightness:" msgstr "" -#: Client/core/CCredits.cpp:34 -msgid "Programming" +#: Client/core/CSettings.cpp:643 Client/core/CSettings.cpp:748 +msgid "FX Quality:" msgstr "" -#: Client/core/CCredits.cpp:63 -msgid "Contributors" +#: Client/core/CSettings.cpp:644 Client/core/CSettings.cpp:762 +msgid "Anisotropic filtering:" msgstr "" -#: Client/core/CCredits.cpp:84 -msgid "Game Design / Scripting" +#: Client/core/CSettings.cpp:644 Client/core/CSettings.cpp:789 +msgid "Anti-aliasing:" msgstr "" -#: Client/core/CCredits.cpp:104 -msgid "Language Localization" +#: Client/core/CSettings.cpp:644 Client/core/CSettings.cpp:803 +msgid "Aspect Ratio:" msgstr "" -#: Client/core/CCredits.cpp:110 -msgid "Patch contributors" +#: Client/core/CSettings.cpp:661 +msgid "Windowed" msgstr "" -#: Client/core/CCredits.cpp:234 -msgid "Special Thanks" +#: Client/core/CSettings.cpp:667 +msgid "DPI aware" msgstr "" -#: Client/core/CCredits.cpp:265 -msgid "" -"This software and project makes use of the following libraries and software:" +#: Client/core/CSettings.cpp:682 Client/core/CSettings.cpp:1631 +msgid "Standard" msgstr "" -#: Client/core/CJoystickManager.cpp:1578 -msgid "Accelerate Axis" +#: Client/core/CSettings.cpp:684 Client/core/CSettings.cpp:1635 +msgid "Borderless keep res" msgstr "" -#: Client/core/CJoystickManager.cpp:1580 -msgid "Brake Axis" +#: Client/core/CSettings.cpp:688 +msgid "Mip Mapping" msgstr "" -#. TRANSLATORS: Replace with your language native name -#: Client/core/CLocalization.cpp:16 -msgid "English" +#: Client/core/CSettings.cpp:756 Client/core/CSettings.cpp:1535 +msgid "Low" msgstr "" -#: Client/core/CMainMenu.cpp:333 -msgid "" -"You are using a feature-branch build! This is a test build only which cannot " -"be used to connect to public servers!" +#: Client/core/CSettings.cpp:757 Client/core/CSettings.cpp:1537 +msgid "Medium" msgstr "" -#: Client/core/CMainMenu.cpp:352 -msgid "" -"MTA will not receive updates on XP/Vista after July 2019.\n" -"\n" -"Upgrade Windows to play on the latest servers." +#: Client/core/CSettings.cpp:758 Client/core/CSettings.cpp:1104 +#: Client/core/CSettings.cpp:1539 Client/core/CSettings.cpp:3170 +msgid "High" msgstr "" -#: Client/core/CMainMenu.cpp:1193 -msgid "" -"This will disconnect you from the current server.\n" -"\n" -"Are you sure you want to disconnect?" +#: Client/core/CSettings.cpp:759 Client/core/CSettings.cpp:1541 +msgid "Very high" msgstr "" -#: Client/core/CMainMenu.cpp:1197 -msgid "DISCONNECT WARNING" +#: Client/core/CSettings.cpp:774 Client/core/CSettings.cpp:797 +#: Client/core/CSettings.cpp:1035 Client/core/CSettings.cpp:1089 +#: Client/core/CSettings.cpp:1219 Client/core/CSettings.cpp:1545 +#: Client/core/CSettings.cpp:3177 Client/core/CSettings.cpp:3209 +#: Client/core/CSettings.cpp:3231 Client/core/CSettings.cpp:4272 +msgid "Off" msgstr "" -#: Client/core/CVersionUpdater.cpp:626 -msgid "Busy" +#: Client/core/CSettings.cpp:798 Client/core/CSettings.cpp:1547 +msgid "1x" msgstr "" -#: Client/core/CVersionUpdater.cpp:626 -msgid "Can't check for updates right now" +#: Client/core/CSettings.cpp:799 Client/core/CSettings.cpp:1549 +msgid "2x" msgstr "" -#: Client/core/CVersionUpdater.cpp:1567 Client/core/CVersionUpdater.cpp:1587 -#: Client/core/CVersionUpdater.cpp:1605 -#, c-format -msgid "MTA:SA %s required" +#: Client/core/CSettings.cpp:800 Client/core/CSettings.cpp:1551 +msgid "3x" msgstr "" -#: Client/core/CVersionUpdater.cpp:1568 -#, c-format -msgid "" -"An updated version of MTA:SA %s is required to join the selected server.\n" -"\n" -"Do you want to download and install MTA:SA %s ?" +#: Client/core/CSettings.cpp:813 Client/core/CSettings.cpp:1037 +#: Client/core/CSettings.cpp:1557 Client/core/CSettings.cpp:3179 +msgid "Auto" msgstr "" -#: Client/core/CVersionUpdater.cpp:1588 -#, c-format -msgid "Do you want to launch MTA:SA %s and connect to this server ?" +#: Client/core/CSettings.cpp:814 Client/core/CSettings.cpp:1559 +msgid "4:3" msgstr "" -#: Client/core/CVersionUpdater.cpp:1606 -msgid "" -"It is not possible to connect at this time.\n" -"\n" -"Please try later." +#: Client/core/CSettings.cpp:815 Client/core/CSettings.cpp:1561 +msgid "16:10" msgstr "" -#: Client/core/CVersionUpdater.cpp:1788 -msgid "Connecting" +#: Client/core/CSettings.cpp:816 Client/core/CSettings.cpp:1563 +msgid "16:9" msgstr "" -#: Client/core/CVersionUpdater.cpp:1789 Client/core/CVersionUpdater.cpp:1805 -msgid "Please wait..." +#: Client/core/CSettings.cpp:819 +msgid "HUD Match Aspect Ratio" msgstr "" -#: Client/core/CVersionUpdater.cpp:1804 -msgid "CHECKING" +#: Client/core/CSettings.cpp:825 +msgid "Volumetric Shadows" msgstr "" -#: Client/core/CVersionUpdater.cpp:1821 Client/core/CVersionUpdater.cpp:1914 -msgid "UPDATE CHECK" +#: Client/core/CSettings.cpp:829 +msgid "Grass effect" msgstr "" -#: Client/core/CVersionUpdater.cpp:1822 -msgid "No update needed" +#: Client/core/CSettings.cpp:833 +msgid "Heat haze" msgstr "" -#: Client/core/CVersionUpdater.cpp:1839 -msgid "DOWNLOADING" +#: Client/core/CSettings.cpp:837 +msgid "Tyre Smoke etc" msgstr "" -#: Client/core/CVersionUpdater.cpp:1840 -msgid "waiting..." +#: Client/core/CSettings.cpp:841 +msgid "Dynamic ped shadows" msgstr "" -#: Client/core/CVersionUpdater.cpp:1856 -msgid "MANDATORY UPDATE" +#: Client/core/CSettings.cpp:845 +msgid "Motion blur" msgstr "" -#: Client/core/CVersionUpdater.cpp:1857 -msgid "" -"To join this server, you must update MTA.\n" -"\n" -" Do you want to update now ?" +#: Client/core/CSettings.cpp:849 +msgid "Corona rain reflections" msgstr "" -#: Client/core/CVersionUpdater.cpp:1875 -msgid "OPTIONAL UPDATE" +#: Client/core/CSettings.cpp:854 +msgid "Full Screen Minimize" msgstr "" -#: Client/core/CVersionUpdater.cpp:1876 -msgid "" -"Server says an update is recommended, but not essential.\n" -"\n" -" Do you want to update now ?" +#: Client/core/CSettings.cpp:866 +msgid "Enable Device Selection Dialog" msgstr "" -#: Client/core/CVersionUpdater.cpp:1915 -msgid "" -"An update is currently not available.\n" -"\n" -"Please check www.mtasa.com" +#: Client/core/CSettings.cpp:878 +msgid "Show unsafe resolutions" msgstr "" -#: Client/core/CVersionUpdater.cpp:1936 Client/core/CVersionUpdater.cpp:2118 -msgid "ERROR SAVING" +#: Client/core/CSettings.cpp:890 +msgid "Render vehicles always in high detail" msgstr "" -#: Client/core/CVersionUpdater.cpp:1937 Client/core/CVersionUpdater.cpp:2119 -msgid "Unable to create the file." +#: Client/core/CSettings.cpp:894 +msgid "Render peds always in high detail" msgstr "" -#: Client/core/CVersionUpdater.cpp:1945 Client/core/CVersionUpdater.cpp:1954 -#: Client/core/CVersionUpdater.cpp:2127 Client/core/CVersionUpdater.cpp:2136 -msgid "ERROR DOWNLOADING" +#: Client/core/CSettings.cpp:923 +msgid "Enable remote websites" msgstr "" -#: Client/core/CVersionUpdater.cpp:1946 Client/core/CVersionUpdater.cpp:2128 -msgid "The downloaded file appears to be incorrect." +#: Client/core/CSettings.cpp:928 +msgid "Enable Javascript on remote websites" msgstr "" -#: Client/core/CVersionUpdater.cpp:1955 Client/core/CVersionUpdater.cpp:2137 -msgid "For some reason." +#: Client/core/CSettings.cpp:933 +msgid "Enable GPU rendering" msgstr "" -#: Client/core/CVersionUpdater.cpp:1966 Client/core/CVersionUpdater.cpp:2150 -msgid "DOWNLOAD COMPLETE" +#: Client/core/CSettings.cpp:937 +msgid "Custom blacklist" msgstr "" -#: Client/core/CVersionUpdater.cpp:1990 -msgid " - Unknown problem in _DialogUpdateResult" +#: Client/core/CSettings.cpp:948 Client/core/CSettings.cpp:983 +msgid "Enter a domain e.g. google.com" msgstr "" -#: Client/core/CVersionUpdater.cpp:2088 Client/core/CVersionUpdater.cpp:2098 -msgid "Ok" +#: Client/core/CSettings.cpp:956 +msgid "Block" msgstr "" -#: Client/core/CVersionUpdater.cpp:2096 -msgid "ERROR" +#: Client/core/CSettings.cpp:964 Client/core/CSettings.cpp:999 +msgid "Domain" msgstr "" -#: Client/core/CVersionUpdater.cpp:2097 -msgid "" -"Some MTA:SA data files are missing.\n" -"\n" -"\n" -"Please reinstall MTA:SA" +#: Client/core/CSettings.cpp:966 Client/core/CSettings.cpp:1001 +msgid "Remove domain" msgstr "" -#: Client/core/CVersionUpdater.cpp:2774 -#, c-format -msgid "%3d %% completed" +#. Reset vecTemp +#: Client/core/CSettings.cpp:972 +msgid "Custom whitelist" msgstr "" -#: Client/core/CVersionUpdater.cpp:2777 -#, c-format -msgid "" -"\n" -"\n" -"Waiting for response - %-3d" +#. Misc section label +#: Client/core/CSettings.cpp:1014 +msgid "Misc" msgstr "" -#. Create window -#: Client/core/CConsole.cpp:417 -msgid "CONSOLE" +#. Fast clothes loading +#: Client/core/CSettings.cpp:1020 Client/core/CSettings.cpp:1028 +#: Client/core/CSettings.cpp:4841 +msgid "Fast CJ clothes loading:" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:25 -msgid "Idle" +#. Browser scan speed +#: Client/core/CSettings.cpp:1020 Client/core/CSettings.cpp:1042 +#: Client/core/CSettings.cpp:4843 +msgid "Browser speed:" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:150 -msgid "player" -msgid_plural "players" -msgstr[0] "" -msgstr[1] "" +#. Single download +#: Client/core/CSettings.cpp:1020 Client/core/CSettings.cpp:1056 +#: Client/core/CSettings.cpp:4845 +msgid "Single connection:" +msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:151 -msgid "on" +#. Packet tag +#: Client/core/CSettings.cpp:1020 Client/core/CSettings.cpp:1069 +#: Client/core/CSettings.cpp:4847 +msgid "Packet tag:" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:154 -msgid "server" -msgid_plural "servers" -msgstr[0] "" -msgstr[1] "" +#. Progress animation +#: Client/core/CSettings.cpp:1021 Client/core/CSettings.cpp:1082 +#: Client/core/CSettings.cpp:4849 +msgid "Progress animation:" +msgstr "" -#. We are polling for the master server list (first pass) -#: Client/core/ServerBrowser/CServerList.cpp:238 -#, c-format -msgid "Requesting master server list (%lu ms elapsed)" +#. Process priority +#: Client/core/CSettings.cpp:1021 Client/core/CSettings.cpp:1095 +#: Client/core/CSettings.cpp:4839 +msgid "Process priority:" msgstr "" -#. Abort -#: Client/core/ServerBrowser/CServerList.cpp:254 -msgid "Master server list could not be parsed." +#. Debug setting +#: Client/core/CSettings.cpp:1021 Client/core/CSettings.cpp:1109 +#: Client/core/CSettings.cpp:4851 +msgid "Debug setting:" msgstr "" -#. Abort -#: Client/core/ServerBrowser/CServerList.cpp:264 -msgid "Master server list could not be retrieved." +#. Streaming memory +#: Client/core/CSettings.cpp:1022 Client/core/CSettings.cpp:1132 +#: Client/core/CSettings.cpp:4853 +msgid "Streaming memory:" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:274 -msgid "(Backup server list)" +#. Update build type +#: Client/core/CSettings.cpp:1022 Client/core/CSettings.cpp:1233 +msgid "Update build type:" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:326 -msgid "Cannot bind LAN-broadcast socket" +#. UpdateAutoInstall +#: Client/core/CSettings.cpp:1022 Client/core/CSettings.cpp:1212 +msgid "Install important updates:" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:345 -msgid "Attempting to discover LAN servers" +#: Client/core/CSettings.cpp:1036 Client/core/CSettings.cpp:1064 +#: Client/core/CSettings.cpp:1077 Client/core/CSettings.cpp:3181 +#: Client/core/CSettings.cpp:3197 Client/core/CSettings.cpp:3204 +msgid "On" msgstr "" -#. Create queue window -#: Client/core/ServerBrowser/CServerInfo.cpp:32 -#: Client/core/ServerBrowser/CServerInfo.cpp:302 -msgid "SERVER IS FULL" +#: Client/core/CSettings.cpp:1049 Client/core/CSettings.cpp:3186 +msgid "Very slow" msgstr "" -#. Determine our label draw position for L10n -#. Start position -#. Server Name -#: Client/core/ServerBrowser/CServerInfo.cpp:44 -#: Client/core/ServerBrowser/CServerInfo.cpp:53 -msgid "Name:" +#: Client/core/CSettings.cpp:1050 Client/core/CSettings.cpp:1063 +#: Client/core/CSettings.cpp:1076 Client/core/CSettings.cpp:1090 +#: Client/core/CSettings.cpp:1116 Client/core/CSettings.cpp:1128 +#: Client/core/CSettings.cpp:1220 Client/core/CSettings.cpp:1240 +#: Client/core/CSettings.cpp:3188 Client/core/CSettings.cpp:3195 +#: Client/core/CSettings.cpp:3202 Client/core/CSettings.cpp:3211 +#: Client/core/CSettings.cpp:3224 +msgid "Default" msgstr "" -#. Server IP -#: Client/core/ServerBrowser/CServerInfo.cpp:44 -#: Client/core/ServerBrowser/CServerInfo.cpp:64 -msgid "Server Address:" +#: Client/core/CSettings.cpp:1051 Client/core/CSettings.cpp:3190 +msgid "Fast" msgstr "" -#. Gamemode -#: Client/core/ServerBrowser/CServerInfo.cpp:44 -#: Client/core/ServerBrowser/CServerInfo.cpp:75 -msgid "Gamemode:" +#: Client/core/CSettings.cpp:1102 Client/core/CSettings.cpp:3166 +msgid "Normal" msgstr "" -#. Map -#: Client/core/ServerBrowser/CServerInfo.cpp:44 -#: Client/core/ServerBrowser/CServerInfo.cpp:86 -msgid "Map:" +#: Client/core/CSettings.cpp:1103 Client/core/CSettings.cpp:3168 +msgid "Above normal" msgstr "" -#. Players -#: Client/core/ServerBrowser/CServerInfo.cpp:45 -#: Client/core/ServerBrowser/CServerInfo.cpp:97 -msgid "Players:" +#: Client/core/CSettings.cpp:1139 +msgid "Min" msgstr "" -#. Passworded -#: Client/core/ServerBrowser/CServerInfo.cpp:45 -#: Client/core/ServerBrowser/CServerInfo.cpp:108 -msgid "Passworded:" +#: Client/core/CSettings.cpp:1152 +msgid "Max" msgstr "" -#. Latency -#: Client/core/ServerBrowser/CServerInfo.cpp:45 -#: Client/core/ServerBrowser/CServerInfo.cpp:119 -msgid "Latency:" +#. Windows 8 compatibility +#: Client/core/CSettings.cpp:1159 +msgid "Windows 8 compatibility:" msgstr "" -#. Column for player names -#. Player List Columns -#: Client/core/ServerBrowser/CServerInfo.cpp:138 -#: Client/core/ServerBrowser/CServerBrowser.cpp:478 -msgid "Player list" +#: Client/core/CSettings.cpp:1163 +msgid "16-bit color" msgstr "" -#. Close button -#: Client/core/ServerBrowser/CServerInfo.cpp:144 -msgid "Close" +#: Client/core/CSettings.cpp:1168 +msgid "Mouse fix" msgstr "" -#. Join Game button -#: Client/core/ServerBrowser/CServerInfo.cpp:152 -msgid "Join Game" +#. Cache path info +#: Client/core/CSettings.cpp:1186 +msgid "Client resource files:" msgstr "" -#. Please enter password label -#: Client/core/ServerBrowser/CServerInfo.cpp:166 -msgid "Please enter the password to the server:" +#: Client/core/CSettings.cpp:1190 +msgid "Show in Explorer" msgstr "" -#: Client/core/ServerBrowser/CServerInfo.cpp:177 -msgid "Join the server as soon as a player slot is available." +#. Auto updater section label +#: Client/core/CSettings.cpp:1205 Client/core/CSettings.cpp:1208 +msgid "Auto updater" msgstr "" -#: Client/core/ServerBrowser/CServerInfo.cpp:310 -msgid "PLEASE ENTER SERVER PASSWORD" +#. Check for updates +#: Client/core/CSettings.cpp:1246 +msgid "Check for update now" msgstr "" -#: Client/core/ServerBrowser/CServerInfo.cpp:319 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1380 -#: Client/loader/MainFunctions.cpp:603 Client/loader/MainFunctions.cpp:610 -#: Client/loader/MainFunctions.cpp:1219 -msgid "Information" +#: Client/core/CSettings.cpp:1400 +msgid "Some settings will be changed when you next start MTA" msgstr "" -#. The server has timed out -#: Client/core/ServerBrowser/CServerInfo.cpp:402 -msgid "Timed Out" +#: Client/core/CSettings.cpp:1401 +msgid "" +"\n" +"\n" +"Do you want to restart now?" msgstr "" -#. Set every GUI elements text to blank -#: Client/core/ServerBrowser/CServerInfo.cpp:431 -msgid "Querying..." +#: Client/core/CSettings.cpp:1404 +msgid "RESTART REQUIRED" msgstr "" -#. Create the window -#: Client/core/ServerBrowser/CServerBrowser.cpp:85 -msgid "SERVER BROWSER" +#: Client/core/CSettings.cpp:1424 +msgid "Some settings will be changed when you disconnect the current server" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:134 -msgid "Local" +#: Client/core/CSettings.cpp:1425 +msgid "" +"\n" +"\n" +"Do you want to disconnect now?" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:135 -msgid "Favourites" +#: Client/core/CSettings.cpp:1428 +msgid "DISCONNECT REQUIRED" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:136 -msgid "Recent" +#. Update the joystick name +#: Client/core/CSettings.cpp:1760 +msgid "Joypad not detected - Check connections and restart game" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:191 -msgid "" -"FOR QUICK CONNECT:\n" -"\n" -"Type the address and port into the address bar.\n" -"Or select a server from the history list and press 'Connect'" +#: Client/core/CSettings.cpp:1957 +msgid "Binding axis" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:203 -msgid "HELP" +#: Client/core/CSettings.cpp:1957 +msgid "Move an axis to bind, or escape to clear" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:212 -#: Client/core/ServerBrowser/CServerBrowser.cpp:252 -msgid "Refresh" +#: Client/core/CSettings.cpp:2034 +msgid "Language:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:212 -#: Client/core/ServerBrowser/CServerBrowser.cpp:253 -msgid "Add Favorite" +#: Client/core/CSettings.cpp:2034 +msgid "Skin:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:212 -#: Client/core/ServerBrowser/CServerBrowser.cpp:254 -#: Client/core/ServerBrowser/CServerBrowser.cpp:301 -#: Client/core/ServerBrowser/CServerBrowser.cpp:372 -msgid "Connect" +#: Client/core/CSettings.cpp:2034 +msgid "Presets:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:212 -#: Client/core/ServerBrowser/CServerBrowser.cpp:255 -msgid "Server information" +#: Client/core/CSettings.cpp:2083 +msgid "Chat" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:213 -#: Client/core/ServerBrowser/CServerBrowser.cpp:256 -msgid "Search servers" +#: Client/core/CSettings.cpp:2100 +msgid "Load" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:213 -#: Client/core/ServerBrowser/CServerBrowser.cpp:257 -msgid "Search players" +#: Client/core/CSettings.cpp:2112 +msgid "Colors" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:213 -#: Client/core/ServerBrowser/CServerBrowser.cpp:258 -msgid "Start search" +#: Client/core/CSettings.cpp:2113 +msgid "Layout" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:299 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1697 -msgid "Search players..." +#: Client/core/CSettings.cpp:2114 Client/core/CSettings.cpp:2360 +msgid "Options" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:422 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1695 -msgid "Search servers..." +#: Client/core/CSettings.cpp:2120 +msgid "Chat Background" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:453 -msgid "Name" +#: Client/core/CSettings.cpp:2120 +msgid "Chat Text" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:454 -msgid "Players" +#: Client/core/CSettings.cpp:2120 +msgid "Input Background" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:455 -msgid "Ping" +#: Client/core/CSettings.cpp:2120 +msgid "Input Text" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:456 -msgid "Gamemode" +#: Client/core/CSettings.cpp:2143 +msgid "Lines:" msgstr "" -#. Include label -#: Client/core/ServerBrowser/CServerBrowser.cpp:486 -msgid "Include:" +#: Client/core/CSettings.cpp:2143 +msgid "Scale:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:492 -msgid "Empty" +#: Client/core/CSettings.cpp:2143 +msgid "Width:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:498 -msgid "Full" +#: Client/core/CSettings.cpp:2146 +msgid "Size" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:504 -msgid "Locked" +#: Client/core/CSettings.cpp:2195 +msgid "after" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:516 -msgid "Offline" +#: Client/core/CSettings.cpp:2195 +msgid "for" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:529 -msgid "Other Versions" +#: Client/core/CSettings.cpp:2195 +msgid "sec" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:550 -msgid "Back" +#: Client/core/CSettings.cpp:2198 +msgid "Fading" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:556 -#: Client/loader/Dialogs.cpp:135 -msgid "Help" +#: Client/core/CSettings.cpp:2204 +msgid "Fade out old lines" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:741 -msgid "Loading..." +#: Client/core/CSettings.cpp:2244 +msgid "Horizontal:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1240 -#: Client/core/ServerBrowser/CServerBrowser.cpp:2182 -msgid " ..loading.." +#: Client/core/CSettings.cpp:2244 +msgid "Vertical:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1278 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1406 -msgid "No address specified!" +#: Client/core/CSettings.cpp:2244 +msgid "Text-Align:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1291 -msgid "Unknown protocol" +#: Client/core/CSettings.cpp:2244 +msgid "X-Offset:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1291 -msgid "Please use the mtasa:// protocol!" +#: Client/core/CSettings.cpp:2245 +msgid "Y-Offset:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1380 -msgid "You have to select a server to connect to." +#: Client/core/CSettings.cpp:2251 +msgid "Position" msgstr "" -#: Client/core/DXHook/CDirect3DHook9.cpp:124 -msgid "" -"Could not initialize Direct3D9.\n" -"\n" -"Please ensure the DirectX End-User Runtime and\n" -"latest Windows Service Packs are installed correctly." +#: Client/core/CSettings.cpp:2266 Client/core/CSettings.cpp:2280 +msgid "Center" msgstr "" -#: Client/loader/Dialogs.cpp:134 -msgid "Quit" +#: Client/core/CSettings.cpp:2279 +msgid "Top" msgstr "" -#: Client/loader/Dialogs.cpp:151 -msgid "MTA: San Andreas has encountered a problem" +#: Client/core/CSettings.cpp:2281 +msgid "Bottom" msgstr "" -#: Client/loader/Dialogs.cpp:152 -msgid "Crash information" +#: Client/core/CSettings.cpp:2329 +msgid "Font" msgstr "" -#: Client/loader/Dialogs.cpp:153 -msgid "" -"Tick the check box to send this crash info to MTA devs using the 'internet'" +#: Client/core/CSettings.cpp:2366 +msgid "Hide background when not typing" msgstr "" -#: Client/loader/Dialogs.cpp:154 -msgid "Doing so will increase the chance of this crash being fixed." +#: Client/core/CSettings.cpp:2371 +msgid "Nickname completion using the \"Tab\" key" msgstr "" -#: Client/loader/Dialogs.cpp:155 -msgid "Do you want to restart MTA: San Andreas ?" +#: Client/core/CSettings.cpp:2376 +msgid "Allow server to flash the window" msgstr "" -#: Client/loader/Dialogs.cpp:162 -msgid "MTA: San Andreas - Warning" +#: Client/core/CSettings.cpp:2381 +msgid "Allow tray balloon notifications" msgstr "" -#: Client/loader/Dialogs.cpp:163 -msgid "" -"Your Grand Theft Auto: San Andreas install directory contains these files:" +#: Client/core/CSettings.cpp:2386 +msgid "Chat text black/white outline" msgstr "" -#: Client/loader/Dialogs.cpp:165 -msgid "" -"These files are not required and may interfere with the graphical features " -"in this version of MTA:SA.\n" -"\n" -"It is recommended that you remove or rename these files." +#. Create a messagebox to notify the user +#. 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:2635 Client/core/CSettings.cpp:2642 +msgid "Press a key to bind, or escape to clear" msgstr "" -#: Client/loader/Dialogs.cpp:167 -msgid "Keep these files, but also show this warning on next start" +#: Client/core/CSettings.cpp:2636 +msgid "Binding a primary key" msgstr "" -#: Client/loader/Dialogs.cpp:168 -msgid "Do not remind me about these files again" +#: Client/core/CSettings.cpp:2643 +msgid "Binding a secondary key" msgstr "" -#: Client/loader/Dialogs.cpp:169 -msgid "Rename these files from *.dll to *.dll.bak" +#: Client/core/CSettings.cpp:2719 +msgid "GTA GAME CONTROLS" msgstr "" -#: Client/loader/Dialogs.cpp:170 -msgid "Show me these files" +#: Client/core/CSettings.cpp:2721 +msgid "MULTIPLAYER CONTROLS" msgstr "" -#: Client/loader/Dialogs.cpp:171 -msgid "Play MTA:SA" +#: Client/core/CSettings.cpp:2966 Client/core/CSettings.cpp:4802 +msgid "Your nickname contains invalid characters!" msgstr "" -#: Client/loader/Dialogs.cpp:177 -msgid "MTA: San Andreas - Confusing options" +#: Client/core/CSettings.cpp:3816 +msgid "Red:" msgstr "" -#: Client/loader/Dialogs.cpp:178 -msgid "NVidia Optimus detected!" +#: Client/core/CSettings.cpp:3816 +msgid "Green:" msgstr "" -#: Client/loader/Dialogs.cpp:179 -msgid "Try each option and see what works:" +#: Client/core/CSettings.cpp:3816 +msgid "Blue:" msgstr "" -#: Client/loader/Dialogs.cpp:180 -msgid "A - Standard NVidia" +#: Client/core/CSettings.cpp:3816 +msgid "Transparency:" msgstr "" -#: Client/loader/Dialogs.cpp:181 -msgid "B - Alternate NVidia" +#: Client/core/CSettings.cpp:3819 +msgid "Color" msgstr "" -#: Client/loader/Dialogs.cpp:182 -msgid "C - Standard Intel" +#: Client/core/CSettings.cpp:3896 +msgid "Preview" msgstr "" -#: Client/loader/Dialogs.cpp:183 -msgid "D - Alternate Intel" +#: Client/core/CSettings.cpp:4204 +msgid "Please disconnect before changing language" msgstr "" -#: Client/loader/Dialogs.cpp:184 -msgid "If you get desperate, this might help:" +#: Client/core/CSettings.cpp:4232 +msgid "Please disconnect before changing skin" msgstr "" -#: Client/loader/Dialogs.cpp:185 -msgid "If you have already selected an option that works, this might help:" +#: Client/core/CSettings.cpp:4520 +msgid "" +"Volmetric shadows can cause some systems to slow down.\n" +"\n" +"Are you sure you want to enable them?" msgstr "" -#: Client/loader/Dialogs.cpp:186 -msgid "Force windowed mode" +#: Client/core/CSettings.cpp:4524 +msgid "PERFORMANCE WARNING" msgstr "" -#: Client/loader/Dialogs.cpp:187 -msgid "Don't show again" +#: Client/core/CSettings.cpp:4544 +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/loader/Dialogs.cpp:195 -msgid "Warning: Could not detect anti-virus product" +#: Client/core/CSettings.cpp:4546 +msgid "SCREEN UPLOAD INFORMATION" msgstr "" -#: Client/loader/Dialogs.cpp:197 +#: Client/core/CSettings.cpp:4561 msgid "" -"MTA could not detect an anti-virus on your PC.\n" +"Some scripts may play sounds, such as radio, from the internet.\n" "\n" -"Viruses interfere with MTA and degrade your gameplay experience.\n" +"Disabling this setting may decrease network\n" +"bandwidth consumption.\n" +msgstr "" + +#: Client/core/CSettings.cpp:4564 +msgid "EXTERNAL SOUNDS" +msgstr "" + +#: Client/core/CSettings.cpp:4593 +msgid "" +"It seems that you have the Rich Presence connection option enabled.\n" +"Do you want to allow servers to share their data?\n" "\n" -"Press 'Help' for more information." +"This includes yours unique ID identifier." msgstr "" -#: Client/loader/Dialogs.cpp:200 -msgid "I have already installed an anti-virus" +#: Client/core/CSettings.cpp:4598 +msgid "CONSENT TO ALLOW DATA SHARING" msgstr "" -#: Client/loader/Dialogs.cpp:202 +#: Client/core/CSettings.cpp:4622 msgid "" -"I will not install an anti-virus.\n" -"I want my PC to lag and be part of a botnet." +"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" +"\n" +"However, CUSTOMIZED GTA:SA FILES ARE BLOCKED BY MANY SERVERS\n" +"\n" +"Are you sure you want to use them?" msgstr "" -#: Client/loader/Dialogs.cpp:890 Client/loader/Utils.cpp:534 -msgid "Searching for Grand Theft Auto San Andreas" +#: Client/core/CSettings.cpp:4671 +msgid "" +"Enabling DPI awareness is an experimental feature and\n" +"we only recommend it when you play MTA:SA on a scaled monitor.\n" +"You may experience graphical issues if you enable this option.\n" +"\n" +"Are you sure you want to enable this option?" msgstr "" -#: Client/loader/Dialogs.cpp:893 Client/loader/Utils.cpp:536 -msgid "Please start Grand Theft Auto San Andreas" +#: Client/core/CSettings.cpp:4677 +msgid "EXPERIMENTAL FEATURE" msgstr "" -#: Client/loader/Dialogs.cpp:901 Client/loader/Install.cpp:852 -msgid "Installing update..." +#: Client/core/CSettings.cpp:4820 +msgid "Please enter a nickname" msgstr "" -#: Client/loader/Dialogs.cpp:909 Client/loader/Install.cpp:934 -msgid "Extracting files..." +#: Client/core/CSettings.cpp:4821 +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/loader/Dialogs.cpp:914 Client/loader/Utils.cpp:1394 -msgid "Copying files..." +#: Client/core/CSettings.cpp:4839 +msgid "Very experimental feature." msgstr "" -#: Client/loader/Dialogs.cpp:919 Client/loader/Utils.cpp:1454 -msgid "Copy finished early. Everything OK." +#: Client/core/CSettings.cpp:4841 +msgid "Stops stalls with CJ variations (Uses 65MB more RAM)" msgstr "" -#: Client/loader/Dialogs.cpp:924 Client/loader/Utils.cpp:1460 -msgid "Finishing..." +#: Client/core/CSettings.cpp:4843 +msgid "Older routers may require a slower scan speed." msgstr "" -#: Client/loader/Dialogs.cpp:928 Client/loader/Utils.cpp:1462 -msgid "Done!" +#: Client/core/CSettings.cpp:4845 +msgid "Switch on to use only one connection when downloading." msgstr "" -#: Client/loader/Utils.cpp:600 -msgid "Select your Grand Theft Auto: San Andreas Installation Directory" +#: Client/core/CSettings.cpp:4847 +msgid "Tag network packets to help ISPs identify MTA traffic." msgstr "" -#: Client/loader/Utils.cpp:968 Client/loader/CInstallManager.cpp:361 -#, c-format -msgid "" -"MTA:SA needs Administrator access for the following task:\n" -"\n" -" '%s'\n" -"\n" -"Please confirm in the next window." +#: Client/core/CSettings.cpp:4849 +msgid "Spinning circle animation at the bottom of the screen" msgstr "" -#: Client/loader/Utils.cpp:1069 -#, c-format -msgid "Error loading %s module! (%s)" +#: Client/core/CSettings.cpp:4851 +msgid "Select default always. (This setting is not saved)" msgstr "" -#: Client/loader/Utils.cpp:1502 -#, c-format -msgid "" -"New installation of %s detected.\n" -"\n" -"Do you want to copy your settings from %s ?" +#: Client/core/CSettings.cpp:4853 +msgid "Maximum is usually best" msgstr "" -#: Client/loader/Utils.cpp:1541 -#, c-format -msgid "GTA:SA had trouble opening the file '%s'" +#: Client/core/CSettings.cpp:4855 Client/core/CSettings.cpp:4857 +msgid "Auto updater:" msgstr "" -#: Client/loader/Utils.cpp:1563 -#, c-format -msgid "GTA:SA is missing the file '%s'." +#: Client/core/CSettings.cpp:4855 +msgid "Select default unless you like filling out bug reports." msgstr "" -#: Client/loader/Utils.cpp:1588 -msgid "GTA:SA had trouble loading a model." +#: Client/core/CSettings.cpp:4857 +msgid "Select default to automatically install important updates." msgstr "" -#: Client/loader/Utils.cpp:1590 -msgid "If you recently modified gta3.img, then try reinstalling GTA:SA." +#: Client/core/CSettings.cpp:4859 +msgid "16-bit color:" msgstr "" -#: Client/loader/Utils.cpp:1615 -msgid "GTA:SA had trouble adding an upgrade to a vehicle." +#: Client/core/CSettings.cpp:4859 +msgid "Enable 16 bit color modes - Requires MTA restart" msgstr "" -#: Client/loader/Utils.cpp:1634 -#, c-format -msgid "GTA:SA found errors in the file '%s'" +#: Client/core/CSettings.cpp:4861 +msgid "Mouse fix:" msgstr "" -#: Client/loader/Utils.cpp:1716 -msgid "Did your computer restart when playing MTA:SA?" +#: Client/core/CSettings.cpp:4861 +msgid "Mouse movement fix - May need PC restart" msgstr "" -#: Client/loader/Utils.cpp:1781 -msgid "Please terminate the following programs before continuing:" +#: Client/core/CConnectManager.cpp:79 +msgid "Connecting failed. Invalid nick provided!" msgstr "" -#: Client/loader/Install.cpp:265 -msgid "Unknown" +#: Client/core/CConnectManager.cpp:110 +msgid "Connecting failed. Invalid host provided!" msgstr "" -#: Client/loader/Install.cpp:272 +#: Client/core/CConnectManager.cpp:126 #, c-format -msgid "" -"The file '%s' is currently locked by %zu processes.\n" -"\n" -"Do you want to terminate the following processes and continue updating?\n" -"\n" -"%s" +msgid "Connecting to %s at port %u failed!" msgstr "" -#: Client/loader/Install.cpp:479 +#. Display the status box +#: Client/core/CConnectManager.cpp:147 #, c-format -msgid "" -"Your installation may be corrupt now.\n" -"\n" -"%zu out of %zu files could not be restored from the backup.\n" -"\n" -"You should reinstall Multi Theft Auto from www.multitheftauto.com\n" -"or try running the update with administrator rights." +msgid "Connecting to %s:%u ..." msgstr "" -#: Client/loader/MainFunctions.cpp:248 -msgid "" -"Trouble restarting MTA:SA\n" -"\n" -"If the problem persists, open Task Manager and\n" -"stop the 'gta_sa.exe' and 'Multi Theft Auto.exe' processes\n" -"\n" -"\n" -"Try to launch MTA:SA again?" +#. Failed loading the mod +#: Client/core/CConnectManager.cpp:403 +#, c-format +msgid "No such mod installed (%s)" msgstr "" -#: Client/loader/MainFunctions.cpp:266 -msgid "" -"Another instance of MTA is already running.\n" -"\n" -"If this problem persists, please restart your computer" +#: Client/core/CConnectManager.cpp:411 +msgid "Bad server response (2)" msgstr "" -#: Client/loader/MainFunctions.cpp:269 -msgid "" -"Another instance of MTA is already running.\n" -"\n" -"Do you want to terminate it?" +#: Client/core/CConnectManager.cpp:421 +msgid "Bad server response (1)" msgstr "" -#: Client/loader/MainFunctions.cpp:294 -msgid "" -"Are you having problems running MTA:SA?.\n" -"\n" -"Do you want to revert to an earlier version?" +#. Create window +#: Client/core/CConsole.cpp:417 +msgid "CONSOLE" msgstr "" -#: Client/loader/MainFunctions.cpp:324 +#: Client/core/DXHook/CDirect3DHook9.cpp:124 msgid "" -"There seems to be a problem launching MTA:SA.\n" -"Resetting GTA settings can sometimes fix this problem.\n" +"Could not initialize Direct3D9.\n" "\n" -"Do you want to reset GTA settings now?" +"Please ensure the DirectX End-User Runtime and\n" +"latest Windows Service Packs are installed correctly." msgstr "" -#: Client/loader/MainFunctions.cpp:339 -msgid "" -"GTA settings have been reset.\n" -"\n" -"Press OK to continue." +#. Create the window +#: Client/core/ServerBrowser/CServerBrowser.cpp:85 +msgid "SERVER BROWSER" msgstr "" -#: Client/loader/MainFunctions.cpp:344 -#, c-format -msgid "File could not be deleted: '%s'" +#: Client/core/ServerBrowser/CServerBrowser.cpp:134 +msgid "Local" msgstr "" -#. No settings to delete, or can't find them -#: Client/loader/MainFunctions.cpp:352 -msgid "" -"Are you having problems running MTA:SA?.\n" -"\n" -"Do you want to see some online help?" +#: Client/core/ServerBrowser/CServerBrowser.cpp:135 +msgid "Favourites" msgstr "" -#. Inform user -#: Client/loader/MainFunctions.cpp:388 -msgid "" -"Are you having problems running MTA:SA?.\n" -"\n" -"Do you want to change the following setting?" +#: Client/core/ServerBrowser/CServerBrowser.cpp:136 +msgid "Recent" msgstr "" -#: Client/loader/MainFunctions.cpp:431 +#: Client/core/ServerBrowser/CServerBrowser.cpp:191 msgid "" -"Are you having problems running MTA:SA?.\n" +"FOR QUICK CONNECT:\n" "\n" -"Try disabling the following products for GTA and MTA:" +"Type the address and port into the address bar.\n" +"Or select a server from the history list and press 'Connect'" msgstr "" -#: Client/loader/MainFunctions.cpp:465 -msgid "" -"WARNING\n" -"\n" -"MTA:SA has detected unusual activity.\n" -"Please run a virus scan to ensure your system is secure.\n" -"\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:203 +msgid "HELP" msgstr "" -#: Client/loader/MainFunctions.cpp:468 -#, c-format -msgid "The detected file was: %s\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:212 +#: Client/core/ServerBrowser/CServerBrowser.cpp:252 +msgid "Refresh" msgstr "" -#: Client/loader/MainFunctions.cpp:602 -msgid "" -"An instance of GTA: San Andreas is already running. It needs to be " -"terminated before MTA:SA can be started. Do you want to do that now?" +#: Client/core/ServerBrowser/CServerBrowser.cpp:212 +#: Client/core/ServerBrowser/CServerBrowser.cpp:253 +msgid "Add Favorite" msgstr "" -#: Client/loader/MainFunctions.cpp:609 -msgid "" -"Unable to terminate GTA: San Andreas. If the problem persists, please " -"restart your computer." +#: Client/core/ServerBrowser/CServerBrowser.cpp:212 +#: Client/core/ServerBrowser/CServerBrowser.cpp:254 +#: Client/core/ServerBrowser/CServerBrowser.cpp:301 +#: Client/core/ServerBrowser/CServerBrowser.cpp:372 +msgid "Connect" msgstr "" -#: Client/loader/MainFunctions.cpp:632 -msgid "" -"Registry entries are missing. Please reinstall Multi Theft Auto: San Andreas." +#: Client/core/ServerBrowser/CServerBrowser.cpp:212 +#: Client/core/ServerBrowser/CServerBrowser.cpp:255 +msgid "Server information" msgstr "" -#: Client/loader/MainFunctions.cpp:638 -msgid "" -"The path to your installation of GTA: San Andreas contains unsupported " -"(unicode) characters. Please move your Grand Theft Auto: San Andreas " -"installation to a compatible path that contains only standard ASCII " -"characters and reinstall Multi Theft Auto: San Andreas." +#: Client/core/ServerBrowser/CServerBrowser.cpp:213 +#: Client/core/ServerBrowser/CServerBrowser.cpp:256 +msgid "Search servers" msgstr "" -#: Client/loader/MainFunctions.cpp:648 -msgid "" -"The path to your installation of 'MTA:SA' or 'GTA: San Andreas'\n" -"contains a ';' (semicolon).\n" -"\n" -" If you experience problems when running MTA:SA,\n" -" move your installation(s) to a path that does not contain a semicolon." +#: Client/core/ServerBrowser/CServerBrowser.cpp:213 +#: Client/core/ServerBrowser/CServerBrowser.cpp:257 +msgid "Search players" msgstr "" -#: Client/loader/MainFunctions.cpp:810 -msgid "" -"Load failed. Please ensure that the latest data files have been installed " -"correctly." +#: Client/core/ServerBrowser/CServerBrowser.cpp:213 +#: Client/core/ServerBrowser/CServerBrowser.cpp:258 +msgid "Start search" msgstr "" -#: Client/loader/MainFunctions.cpp:819 -#, c-format -msgid "Load failed. Please ensure that %s is installed correctly." +#: Client/core/ServerBrowser/CServerBrowser.cpp:299 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1704 +msgid "Search players..." msgstr "" -#: Client/loader/MainFunctions.cpp:826 -#, c-format -msgid "Load failed. Could not find gta_sa.exe in %s." +#: Client/core/ServerBrowser/CServerBrowser.cpp:422 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1702 +msgid "Search servers..." msgstr "" -#: Client/loader/MainFunctions.cpp:836 -#, c-format -msgid "" -"Load failed. %s exists in the GTA directory. Please delete before continuing." +#: Client/core/ServerBrowser/CServerBrowser.cpp:453 +msgid "Name" msgstr "" -#: Client/loader/MainFunctions.cpp:845 -#, c-format -msgid "Main file has an incorrect name (%s)" +#: Client/core/ServerBrowser/CServerBrowser.cpp:454 +msgid "Players" msgstr "" -#: Client/loader/MainFunctions.cpp:856 -msgid "" -"Main file is unsigned. Possible virus activity.\n" -"\n" -"See online help if MTA does not work correctly." +#: Client/core/ServerBrowser/CServerBrowser.cpp:455 +msgid "Ping" msgstr "" -#: Client/loader/MainFunctions.cpp:882 -#, c-format -msgid "" -"Data file %s is missing. Possible virus activity.\n" -"\n" -"Consider reinstalling Multi Theft Auto for your security.\n" -"See online help if MTA does not work correctly." +#: Client/core/ServerBrowser/CServerBrowser.cpp:456 +msgid "Gamemode" msgstr "" -#: Client/loader/MainFunctions.cpp:893 -#, c-format -msgid "" -"Data file %s is modified. Possible virus activity.\n" -"\n" -"Consider reinstalling Multi Theft Auto for your security.\n" -"See online help if MTA does not work correctly." +#. Player List Columns +#. Column for player names +#: Client/core/ServerBrowser/CServerBrowser.cpp:478 +#: Client/core/ServerBrowser/CServerInfo.cpp:138 +msgid "Player list" msgstr "" -#: Client/loader/MainFunctions.cpp:907 -msgid "" -".asi files are in the 'MTA:SA' or 'GTA: San Andreas' installation " -"directory.\n" -"\n" -"Remove these .asi files if you experience problems with MTA:SA." +#. Include label +#: Client/core/ServerBrowser/CServerBrowser.cpp:486 +msgid "Include:" msgstr "" -#: Client/loader/MainFunctions.cpp:1009 -msgid "" -"File version mismatch error. Reinstall MTA:SA if you experience problems.\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:492 +msgid "Empty" msgstr "" -#: Client/loader/MainFunctions.cpp:1018 -msgid "Some files are missing. Reinstall MTA:SA if you experience problems.\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:498 +msgid "Full" msgstr "" -#: Client/loader/MainFunctions.cpp:1030 -msgid "" -"MTA:SA is not compatible with Windows 'Safe Mode'.\n" -"\n" -"Please restart your PC.\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:504 +msgid "Locked" msgstr "" -#: Client/loader/MainFunctions.cpp:1123 -msgid "Fix configuration issue" +#: Client/core/ServerBrowser/CServerBrowser.cpp:516 +msgid "Offline" msgstr "" -#. Try to relaunch as admin if not done so already -#: Client/loader/MainFunctions.cpp:1157 -msgid "Fix elevation required error" +#: Client/core/ServerBrowser/CServerBrowser.cpp:529 +msgid "Other Versions" msgstr "" -#: Client/loader/MainFunctions.cpp:1164 -#, c-format -msgid "" -"Could not start Grand Theft Auto: San Andreas. Please try restarting, or if " -"the problem persists,contact MTA at www.multitheftauto.com. \n" -"\n" -"[%s]" +#: Client/core/ServerBrowser/CServerBrowser.cpp:550 +msgid "Back" msgstr "" -#: Client/loader/MainFunctions.cpp:1219 -msgid "" -"GTA: San Andreas may not have launched correctly. Do you want to terminate " -"it?" +#: Client/core/ServerBrowser/CServerBrowser.cpp:741 +msgid "Loading..." msgstr "" -#: Client/loader/CInstallManager.cpp:376 -#, c-format -msgid "" -"MTA:SA could not complete the following task:\n" -"\n" -" '%s'\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:1247 +#: Client/core/ServerBrowser/CServerBrowser.cpp:2189 +msgid " ..loading.." msgstr "" -#: Client/loader/CInstallManager.cpp:426 -msgid "" -"** The crash was caused by a graphics driver error **\n" -"\n" -"** Please update your graphics drivers **" +#: Client/core/ServerBrowser/CServerBrowser.cpp:1285 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1413 +msgid "No address specified!" msgstr "" -#: Client/loader/CInstallManager.cpp:532 -msgid "Install updated MTA:SA files" +#: Client/core/ServerBrowser/CServerBrowser.cpp:1298 +msgid "Unknown protocol" msgstr "" -#: Client/loader/CInstallManager.cpp:552 -msgid "" -"Could not update due to file conflicts. Please close other applications and " -"retry" +#: Client/core/ServerBrowser/CServerBrowser.cpp:1298 +msgid "Please use the mtasa:// protocol!" msgstr "" -#: Client/loader/CInstallManager.cpp:561 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1387 +msgid "You have to select a server to connect to." +msgstr "" + +#: Client/core/ServerBrowser/CServerList.cpp:25 +msgid "Idle" +msgstr "" + +#: Client/core/ServerBrowser/CServerList.cpp:150 +msgid "player" +msgid_plural "players" +msgstr[0] "" +msgstr[1] "" + +#: Client/core/ServerBrowser/CServerList.cpp:151 +msgid "on" +msgstr "" + +#: Client/core/ServerBrowser/CServerList.cpp:154 +msgid "server" +msgid_plural "servers" +msgstr[0] "" +msgstr[1] "" + +#. We are polling for the master server list (first pass) +#: Client/core/ServerBrowser/CServerList.cpp:238 #, c-format -msgid "Multi Theft Auto has not been installed properly, please reinstall. %s" +msgid "Requesting master server list (%lu ms elapsed)" msgstr "" -#: Client/loader/CInstallManager.cpp:613 -msgid "Create GTA:SA junctions" +#. Abort +#: Client/core/ServerBrowser/CServerList.cpp:254 +msgid "Master server list could not be parsed." msgstr "" -#: Client/loader/CInstallManager.cpp:657 -msgid "MTA:SA cannot launch because copying a file failed:" +#. Abort +#: Client/core/ServerBrowser/CServerList.cpp:264 +msgid "Master server list could not be retrieved." msgstr "" -#: Client/loader/CInstallManager.cpp:663 Client/loader/CInstallManager.cpp:703 -msgid "MTA:SA cannot launch because an MTA:SA file is incorrect or missing:" +#: Client/core/ServerBrowser/CServerList.cpp:274 +msgid "(Backup server list)" msgstr "" -#: Client/loader/CInstallManager.cpp:672 -msgid "Copy MTA:SA files" +#: Client/core/ServerBrowser/CServerList.cpp:326 +msgid "Cannot bind LAN-broadcast socket" msgstr "" -#: Client/loader/CInstallManager.cpp:695 Client/loader/CInstallManager.cpp:773 -msgid "MTA:SA cannot launch because a GTA:SA file is incorrect or missing:" +#: Client/core/ServerBrowser/CServerList.cpp:345 +msgid "Attempting to discover LAN servers" msgstr "" -#: Client/loader/CInstallManager.cpp:780 -msgid "Patch GTA:SA dependency" +#. Create queue window +#: Client/core/ServerBrowser/CServerInfo.cpp:32 +#: Client/core/ServerBrowser/CServerInfo.cpp:302 +msgid "SERVER IS FULL" msgstr "" -#: Client/loader/CInstallManager.cpp:828 -msgid "" -"MTA:SA cannot launch because the GTA:SA executable is incorrect or missing:" +#. Determine our label draw position for L10n +#. Start position +#. Server Name +#: Client/core/ServerBrowser/CServerInfo.cpp:44 +#: Client/core/ServerBrowser/CServerInfo.cpp:53 +msgid "Name:" msgstr "" -#: Client/loader/CInstallManager.cpp:832 -msgid "" -"Please check your anti-virus for a false-positive detection, try to add an " -"exception for the GTA:SA executable and restart MTA:SA." +#. Server IP +#: Client/core/ServerBrowser/CServerInfo.cpp:44 +#: Client/core/ServerBrowser/CServerInfo.cpp:64 +msgid "Server Address:" msgstr "" -#: Client/loader/CInstallManager.cpp:838 -msgid "Generate GTA:SA" +#. Gamemode +#: Client/core/ServerBrowser/CServerInfo.cpp:44 +#: Client/core/ServerBrowser/CServerInfo.cpp:75 +msgid "Gamemode:" msgstr "" -#: Client/loader/CInstallManager.cpp:853 -msgid "MTA:SA cannot launch because the GTA:SA executable is not loadable:" +#. Map +#: Client/core/ServerBrowser/CServerInfo.cpp:44 +#: Client/core/ServerBrowser/CServerInfo.cpp:86 +msgid "Map:" msgstr "" -#: Client/loader/CInstallManager.cpp:860 Client/loader/CInstallManager.cpp:883 -msgid "Patch GTA:SA" +#. Players +#: Client/core/ServerBrowser/CServerInfo.cpp:45 +#: Client/core/ServerBrowser/CServerInfo.cpp:97 +msgid "Players:" msgstr "" -#: Client/loader/CInstallManager.cpp:876 -msgid "MTA:SA cannot launch because patching GTA:SA has failed:" +#. Passworded +#: Client/core/ServerBrowser/CServerInfo.cpp:45 +#: Client/core/ServerBrowser/CServerInfo.cpp:108 +msgid "Passworded:" msgstr "" -#: Client/loader/CInstallManager.cpp:1113 -msgid "Missing file:" +#. Latency +#: Client/core/ServerBrowser/CServerInfo.cpp:45 +#: Client/core/ServerBrowser/CServerInfo.cpp:119 +msgid "Latency:" msgstr "" -#: Client/loader/CInstallManager.cpp:1117 -msgid "If MTA fails to load, please re-install GTA:SA" +#. Close button +#: Client/core/ServerBrowser/CServerInfo.cpp:144 +msgid "Close" msgstr "" -#: Client/loader/CInstallManager.cpp:1152 -msgid "Update install settings" +#. Join Game button +#: Client/core/ServerBrowser/CServerInfo.cpp:152 +msgid "Join Game" msgstr "" -#: Client/loader/CInstallManager.cpp:1305 -msgid "Update compatibility settings" +#. Please enter password label +#: Client/core/ServerBrowser/CServerInfo.cpp:166 +msgid "Please enter the password to the server:" +msgstr "" + +#: Client/core/ServerBrowser/CServerInfo.cpp:177 +msgid "Join the server as soon as a player slot is available." +msgstr "" + +#: Client/core/ServerBrowser/CServerInfo.cpp:310 +msgid "PLEASE ENTER SERVER PASSWORD" +msgstr "" + +#. The server has timed out +#: Client/core/ServerBrowser/CServerInfo.cpp:402 +msgid "Timed Out" +msgstr "" + +#. Set every GUI elements text to blank +#: Client/core/ServerBrowser/CServerInfo.cpp:431 +msgid "Querying..." msgstr "" #. Populate the message and show the box diff --git a/Shared/mods/deathmatch/logic/Enums.cpp b/Shared/mods/deathmatch/logic/Enums.cpp index 1e3d0b2003..20be17719d 100644 --- a/Shared/mods/deathmatch/logic/Enums.cpp +++ b/Shared/mods/deathmatch/logic/Enums.cpp @@ -101,6 +101,7 @@ ADD_ENUM(WorldSpecialProperty::FIREBALLDESTRUCT, "fireballdestruct") ADD_ENUM(WorldSpecialProperty::EXTENDEDWATERCANNONS, "extendedwatercannons") ADD_ENUM(WorldSpecialProperty::ROADSIGNSTEXT, "roadsignstext") ADD_ENUM(WorldSpecialProperty::TUNNELWEATHERBLEND, "tunnelweatherblend") +ADD_ENUM(WorldSpecialProperty::IGNOREFIRESTATE, "ignorefirestate") IMPLEMENT_ENUM_CLASS_END("world-special-property") IMPLEMENT_ENUM_BEGIN(ePacketID) diff --git a/Shared/mods/deathmatch/logic/Enums.h b/Shared/mods/deathmatch/logic/Enums.h index e975d0d907..3125179714 100644 --- a/Shared/mods/deathmatch/logic/Enums.h +++ b/Shared/mods/deathmatch/logic/Enums.h @@ -91,6 +91,7 @@ enum class WorldSpecialProperty ROADSIGNSTEXT, EXTENDEDWATERCANNONS, TUNNELWEATHERBLEND, + IGNOREFIRESTATE, }; DECLARE_ENUM_CLASS(WorldSpecialProperty); diff --git a/Shared/sdk/net/SyncStructures.h b/Shared/sdk/net/SyncStructures.h index 1e9b8215b3..0e42407aae 100644 --- a/Shared/sdk/net/SyncStructures.h +++ b/Shared/sdk/net/SyncStructures.h @@ -2044,6 +2044,10 @@ struct SWorldSpecialPropertiesStateSync : public ISyncStructure { BITCOUNT5 = 1 }; + enum + { + BITCOUNT6 = 1 + }; bool Read(NetBitStreamInterface& bitStream) { @@ -2068,6 +2072,11 @@ struct SWorldSpecialPropertiesStateSync : public ISyncStructure else data5.tunnelweatherblend = true; + if (bitStream.Can(eBitStreamVersion::WorldSpecialProperty_IgnoreFireState)) + isOK &= bitStream.ReadBits(reinterpret_cast(&data6), BITCOUNT6); + else + data6.ignoreFireState = false; + //// Example for adding item: // if (bitStream.Can(eBitStreamVersion::YourProperty)) // isOK &= bitStream.ReadBits(reinterpret_cast(&data9), BITCOUNT9); @@ -2091,6 +2100,9 @@ struct SWorldSpecialPropertiesStateSync : public ISyncStructure if (bitStream.Can(eBitStreamVersion::WorldSpecialProperty_TunnelWeatherBlend)) bitStream.WriteBits(reinterpret_cast(&data5), BITCOUNT5); + if (bitStream.Can(eBitStreamVersion::WorldSpecialProperty_IgnoreFireState)) + bitStream.WriteBits(reinterpret_cast(&data6), BITCOUNT6); + //// Example for adding item: // if (bitStream.Can(eBitStreamVersion::YourProperty)) // bitStream.WriteBits(reinterpret_cast(&data9), BITCOUNT9); @@ -2132,6 +2144,11 @@ struct SWorldSpecialPropertiesStateSync : public ISyncStructure { bool tunnelweatherblend : 1; } data5; + + struct + { + bool ignoreFireState : 1; + } data6; SWorldSpecialPropertiesStateSync() { @@ -2152,6 +2169,7 @@ struct SWorldSpecialPropertiesStateSync : public ISyncStructure data3.roadsignstext = true; data4.extendedwatercannons = true; data5.tunnelweatherblend = true; + data6.ignoreFireState = false; } }; diff --git a/Shared/sdk/net/bitstream.h b/Shared/sdk/net/bitstream.h index 37b6e11e77..a4ddf5da52 100644 --- a/Shared/sdk/net/bitstream.h +++ b/Shared/sdk/net/bitstream.h @@ -572,10 +572,18 @@ enum class eBitStreamVersion : unsigned short // 2024-09-04 RespawnObject_Serverside, + // Add check_duplicate_serials + // 2024-09-04 + CheckDuplicateSerials, + // Add setElementOnFire function // 2024-10-08 SetElementOnFire, + // Add ignorefirestate special world property + // 2024-11-07 + WorldSpecialProperty_IgnoreFireState, + // This allows us to automatically increment the BitStreamVersion when things are added to this enum. // Make sure you only add things above this comment. Next, diff --git a/Shared/sdk/version.h b/Shared/sdk/version.h index 9069c14d9b..12d10c80a5 100644 --- a/Shared/sdk/version.h +++ b/Shared/sdk/version.h @@ -108,7 +108,7 @@ #define _ASE_VERSION QUOTE_DEFINE(MTASA_VERSION_MAJOR) "." QUOTE_DEFINE(MTASA_VERSION_MINOR) #define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk) -#define _CLIENT_NET_MODULE_VERSION 0x0AE // (0x000 - 0xfff) Lvl9 wizards only +#define _CLIENT_NET_MODULE_VERSION 0x0AF // (0x000 - 0xfff) Lvl9 wizards only #define _SERVER_NET_MODULE_VERSION 0x0AB // (0x000 - 0xfff) Lvl9 wizards only #define _NETCODE_VERSION 0x1DA // (0x000 - 0xfff) Increment when net messages change (pre-release) diff --git a/utils/buildactions/install_cef.lua b/utils/buildactions/install_cef.lua index 8430fc68f8..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.11+g57354b8+chromium-129.0.6668.90" -local CEF_HASH = "a3e3e7add2235d1865a8570522ff87dba392e7b2d15bca0983ed2ebe19ea048b" +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