Skip to content

Commit bc0f082

Browse files
authored
Merge branch 'master' into feature/isPlayerCrosshairVisible
2 parents e7a339c + abffd87 commit bc0f082

File tree

2 files changed

+40
-37
lines changed

2 files changed

+40
-37
lines changed

Client/game_sa/CVehicleSA.cpp

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,17 @@ void CVehicleSA::RemoveVehicleUpgrade(DWORD dwModelID)
684684
push dwModelID
685685
call dwFunc
686686
}
687+
688+
// GTA SA only does this when CVehicle::ClearVehicleUpgradeFlags returns false.
689+
// In the case of hydraulics and nitro, this function does not return false and the upgrade is never removed from the array
690+
for (std::int16_t& upgrade : GetVehicleInterface()->m_upgrades)
691+
{
692+
if (upgrade == dwModelID)
693+
{
694+
upgrade = -1;
695+
break;
696+
}
697+
}
687698
}
688699

689700
bool CVehicleSA::DoesSupportUpgrade(const SString& strFrameName)
@@ -1322,49 +1333,41 @@ void CVehicleSA::RecalculateHandling()
13221333
// Put it in our interface
13231334
CVehicleSAInterface* pInt = GetVehicleInterface();
13241335
unsigned int uiHandlingFlags = m_pHandlingData->GetInterface()->uiHandlingFlags;
1325-
// user error correction - NOS_INST = NOS Installed t/f
1326-
// if nos is installed we need the flag set
1327-
if (pInt->m_upgrades[0] && pInt->m_upgrades[0] >= 1008 && pInt->m_upgrades[0] <= 1010)
1336+
bool hydralicsInstalled = false, nitroInstalled = false;
1337+
1338+
// We check whether the user has not set incorrect flags via handlingFlags in the case of nitro and hydraulics
1339+
// If this happened, we need to correct it
1340+
for (const std::int16_t& upgradeID : pInt->m_upgrades)
13281341
{
1329-
// Flag not enabled?
1330-
if (uiHandlingFlags | HANDLING_NOS_Flag)
1342+
// Empty upgrades value is -1
1343+
if (upgradeID < 0)
1344+
continue;
1345+
1346+
// If NOS is installed we need set the flag
1347+
if ((upgradeID >= 1008 && upgradeID <= 1010) && !(uiHandlingFlags & HANDLING_NOS_Flag))
13311348
{
1332-
// Set zee flag
13331349
uiHandlingFlags |= HANDLING_NOS_Flag;
1334-
m_pHandlingData->SetHandlingFlags(uiHandlingFlags);
1335-
}
1336-
}
1337-
else
1338-
{
1339-
// Flag Enabled?
1340-
if (uiHandlingFlags & HANDLING_NOS_Flag)
1341-
{
1342-
// Unset the flag
1343-
uiHandlingFlags &= ~HANDLING_NOS_Flag;
1344-
m_pHandlingData->SetHandlingFlags(uiHandlingFlags);
1350+
nitroInstalled = true;
13451351
}
1346-
}
1347-
// Hydraulics Flag fixing
1348-
if (pInt->m_upgrades[1] && pInt->m_upgrades[1] == 1087)
1349-
{
1350-
// Flag not enabled?
1351-
if (uiHandlingFlags | HANDLING_Hydraulics_Flag)
1352+
1353+
// If hydraulics is installed we need set the flag
1354+
if ((upgradeID == 1087) && !(uiHandlingFlags & HANDLING_Hydraulics_Flag))
13521355
{
1353-
// Set zee flag
13541356
uiHandlingFlags |= HANDLING_Hydraulics_Flag;
1355-
m_pHandlingData->SetHandlingFlags(uiHandlingFlags);
1356-
}
1357-
}
1358-
else
1359-
{
1360-
// Flag Enabled?
1361-
if (uiHandlingFlags & HANDLING_Hydraulics_Flag)
1362-
{
1363-
// Unset the flag
1364-
uiHandlingFlags &= ~HANDLING_Hydraulics_Flag;
1365-
m_pHandlingData->SetHandlingFlags(uiHandlingFlags);
1357+
hydralicsInstalled = true;
13661358
}
13671359
}
1360+
1361+
// If hydraulics isn't installed we need unset the flag
1362+
if ((!hydralicsInstalled) && (uiHandlingFlags & HANDLING_Hydraulics_Flag))
1363+
uiHandlingFlags &= ~HANDLING_Hydraulics_Flag;
1364+
1365+
// If NOS isn't installed we need unset the flag
1366+
if ((!nitroInstalled) && (uiHandlingFlags & HANDLING_NOS_Flag))
1367+
uiHandlingFlags &= ~HANDLING_NOS_Flag;
1368+
1369+
m_pHandlingData->SetHandlingFlags(uiHandlingFlags);
1370+
13681371
pInt->dwHandlingFlags = uiHandlingFlags;
13691372
pInt->m_fMass = m_pHandlingData->GetInterface()->fMass;
13701373
pInt->m_fTurnMass = m_pHandlingData->GetInterface()->fTurnMass; // * pGame->GetHandlingManager()->GetTurnMassMultiplier();

utils/buildactions/install_cef.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ local CEF_URL_PREFIX = "https://cef-builds.spotifycdn.com/cef_binary_"
99
local CEF_URL_SUFFIX = "_windows32_minimal.tar.bz2"
1010

1111
-- Change here to update CEF version
12-
local CEF_VERSION = "129.0.6+ga918aa7+chromium-129.0.6668.29"
13-
local CEF_HASH = "989b267d6c2eed6feed4ef304664763612619f1d4ca7f21d95a524c139870d36"
12+
local CEF_VERSION = "129.0.11+g57354b8+chromium-129.0.6668.90"
13+
local CEF_HASH = "a3e3e7add2235d1865a8570522ff87dba392e7b2d15bca0983ed2ebe19ea048b"
1414

1515
function make_cef_download_url()
1616
return CEF_URL_PREFIX..http.escapeUrlParam(CEF_VERSION)..CEF_URL_SUFFIX

0 commit comments

Comments
 (0)