Skip to content

Commit 649cc85

Browse files
authored
Merge branch 'master' into client_c20
2 parents d64cd42 + bca4dff commit 649cc85

File tree

5 files changed

+28
-20
lines changed

5 files changed

+28
-20
lines changed

Client/core/CKeyBinds.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,8 @@ CCommandBind* CKeyBinds::FindCommandMatch(const char* szKey, const char* szComma
841841
NullEmptyStrings(szKey, szArguments, szResource, szOriginalScriptKey);
842842

843843
std::string arguments = szArguments ? szArguments : "";
844-
szArguments = SharedUtil::Trim(arguments.data());
844+
if (!arguments.empty())
845+
szArguments = SharedUtil::Trim(arguments.data());
845846

846847
for (KeyBindPtr& bind : m_binds)
847848
{

Client/game_sa/CPoolsSA.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ CVehicle* CPoolsSA::AddVehicle(CClientVehicle* pClientVehicle, eVehicleTypes eVe
128128
{
129129
pVehicle->m_ucVariant = ucVariation;
130130
pVehicle->m_ucVariant2 = ucVariation2;
131+
132+
pVehicle->DumpVehicleFrames();
131133
}
132134
else
133135
{

Client/game_sa/CVehicleSA.cpp

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,6 @@ void CVehicleSA::Init()
186186
}
187187

188188
CopyGlobalSuspensionLinesToPrivate();
189-
190-
// clear our rw frames list
191-
m_ExtraFrames.clear();
192-
// dump the frames
193-
VehicleDump(this);
194-
FinalizeFramesList();
195189
}
196190

197191
CVehicleSA::~CVehicleSA()
@@ -1949,6 +1943,7 @@ void CVehicleSA::AddComponent(RwFrame* pFrame, bool bReadOnly)
19491943
// if the frame is invalid we don't want to be here
19501944
if (!pFrame)
19511945
return;
1946+
19521947
// if the frame already exists ignore it
19531948
if (IsComponentPresent(pFrame->szName) || pFrame->szName == "")
19541949
return;
@@ -1957,23 +1952,22 @@ void CVehicleSA::AddComponent(RwFrame* pFrame, bool bReadOnly)
19571952
// variants have no name field.
19581953
if (strName == "")
19591954
{
1955+
// In MTA variant 255 means no variant
1956+
if ((m_ucVariantCount == 0 && m_ucVariant == 255) || (m_ucVariantCount == 1 && m_ucVariant2 == 255))
1957+
return;
1958+
19601959
// name starts with extra
19611960
strName = "extra_";
1962-
if (m_ucVariantCount == 0)
1963-
{
1964-
// variants are extra_a, extra_b and so on
1965-
strName += ('a' - 1) + m_ucVariant;
1966-
}
1967-
if (m_ucVariantCount == 1)
1968-
{
1969-
// variants are extra_a, extra_b and so on
1970-
strName += ('a' - 1) + m_ucVariant2;
1971-
}
1961+
1962+
// variants are extra_a - extra_f
1963+
strName += 'a' + (m_ucVariantCount == 0 ? m_ucVariant : m_ucVariant2);
1964+
19721965
// increment the variant count ( we assume that the first variant created is variant1 and the second is variant2 )
19731966
m_ucVariantCount++;
19741967
}
1975-
SVehicleFrame frame = SVehicleFrame(pFrame, bReadOnly);
1968+
19761969
// insert our new frame
1970+
SVehicleFrame frame = SVehicleFrame(pFrame, bReadOnly);
19771971
m_ExtraFrames.insert(std::pair<SString, SVehicleFrame>(strName, frame));
19781972
}
19791973

@@ -2001,6 +1995,16 @@ void CVehicleSA::FinalizeFramesList()
20011995
}
20021996
}
20031997

1998+
void CVehicleSA::DumpVehicleFrames()
1999+
{
2000+
// clear our rw frames list
2001+
m_ExtraFrames.clear();
2002+
2003+
// dump the frames
2004+
VehicleDump(this);
2005+
FinalizeFramesList();
2006+
}
2007+
20042008
bool CVehicleSA::SetComponentVisible(const SString& vehicleComponent, bool bRequestVisible)
20052009
{
20062010
SVehicleFrame* pComponent = GetVehicleComponent(vehicleComponent);

Client/game_sa/CVehicleSA.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,4 +687,5 @@ class CVehicleSA : public virtual CVehicle, public virtual CPhysicalSA
687687
void CopyGlobalSuspensionLinesToPrivate();
688688
SVehicleFrame* GetVehicleComponent(const SString& vehicleComponent);
689689
void FinalizeFramesList();
690+
void DumpVehicleFrames();
690691
};

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 = "127.3.4+ge9e2e14+chromium-127.0.6533.100"
13-
local CEF_HASH = "621a2ddf02b81441f7b87214dcdcf1bb35401b646c9750807692e45d9818d174"
12+
local CEF_VERSION = "127.3.5+g114ea2a+chromium-127.0.6533.120"
13+
local CEF_HASH = "ad91d535873bdd2b6f36135d42a383f92ab2f2959be33db0a6f0f4178cf49436"
1414

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

0 commit comments

Comments
 (0)