Skip to content

Commit c589f0b

Browse files
authored
Merge branch 'master' into client_c20
2 parents 5c137e2 + 7e6b4d0 commit c589f0b

File tree

7 files changed

+54
-38
lines changed

7 files changed

+54
-38
lines changed

Client/game_sa/CVehicleSA.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,9 +1592,10 @@ bool CVehicleSA::SpawnFlyingComponent(const eCarNodes& nodeIndex, const eCarComp
15921592
if (removalTime <= -1 || !componentObject)
15931593
return true;
15941594

1595-
std::uint32_t CTimer_ms = *reinterpret_cast<std::uint32_t*>(VAR_CTimer_snTimeInMilliseconds);
1596-
componentObject->uiObjectRemovalTime = CTimer_ms + static_cast<std::uint32_t>(removalTime);
1595+
// Set double-sided
1596+
componentObject->bBackfaceCulled = true;
15971597

1598+
componentObject->uiObjectRemovalTime = pGame->GetSystemTime() + static_cast<std::uint32_t>(removalTime);
15981599
return true;
15991600
}
16001601

Client/game_sa/CVehicleSA.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ struct RwTexture;
106106
#define OFFSET_CBike_Nodes 0x5A0
107107
#define OFFSET_CBoat_Nodes 0x5B0
108108

109-
#define VAR_CTimer_snTimeInMilliseconds 0xB7CB84
110-
111109
struct SRailNodeSA
112110
{
113111
short sX; // x coordinate times 8

Client/mods/deathmatch/logic/CClientPad.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,11 +336,9 @@ bool CClientPad::GetControlState(const char* szName, CControllerState& State, bo
336336
return State.LeftShoulder2 == 255;
337337
break; // zoom out
338338
case 9:
339-
return false;
340-
break; // enter_exit
339+
return State.ButtonTriangle == 255; // enter_exit
341340
case 10:
342-
return false;
343-
break; // change_cam
341+
return State.Select == 255; // change_cam
344342
case 11:
345343
return State.ButtonSquare == 255;
346344
break; // jump
@@ -432,8 +430,7 @@ bool CClientPad::GetControlState(const char* szName, CControllerState& State, bo
432430
return State.RightShoulder2 == 255;
433431
break; // look right
434432
case 33:
435-
return false;
436-
break; // look behind
433+
return State.LeftShoulder2 == 255 && State.RightShoulder2 == 255; // look behind
437434
case 34:
438435
return false;
439436
break; // mouse look

Client/mods/deathmatch/logic/CClientPed.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,10 @@ void CClientPed::WarpIntoVehicle(CClientVehicle* pVehicle, unsigned int uiSeat)
13941394
}
13951395
}
13961396

1397+
// Wrong seat or undefined passengers count?
1398+
if ((uiSeat > 0 && uiSeat > pVehicle->m_ucMaxPassengers) || (uiSeat > 0 && pVehicle->m_ucMaxPassengers == 255))
1399+
return;
1400+
13971401
// Transfer WaitingForGroundToLoad state to vehicle
13981402
if (m_bIsLocalPlayer)
13991403
{

Client/mods/deathmatch/logic/CClientVehicle.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2656,7 +2656,12 @@ void CClientVehicle::Create()
26562656
{
26572657
if (m_pPassengers[i])
26582658
{
2659-
m_pPassengers[i]->WarpIntoVehicle(this, i + 1);
2659+
// Undefined passengers count?
2660+
if (m_ucMaxPassengers != 255)
2661+
m_pPassengers[i]->WarpIntoVehicle(this, i + 1);
2662+
else
2663+
m_pPassengers[i]->SetWarpInToVehicleRequired(false);
2664+
26602665
if (m_pPassengers[i])
26612666
m_pPassengers[i]->StreamIn(true);
26622667
}

Server/mods/deathmatch/logic/CResource.cpp

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,44 +1465,55 @@ bool CResource::ReadIncludedHTML(CXMLNode* pRoot)
14651465

14661466
if (!strFilename.empty())
14671467
{
1468-
std::string strFullFilename;
14691468
ReplaceSlashes(strFilename);
14701469

1471-
if (IsFilenameUsed(strFilename, false))
1470+
if (!IsValidFilePath(strFilename.c_str()))
14721471
{
1473-
CLogger::LogPrintf("WARNING: Duplicate html file in resource '%s': '%s'\n", m_strResourceName.c_str(), strFilename.c_str());
1472+
m_strFailureReason = SString("Couldn't find html %s for resource %s\n", strFilename.c_str(), m_strResourceName.c_str());
1473+
CLogger::ErrorPrintf(m_strFailureReason);
1474+
return false;
14741475
}
14751476

1476-
// Try to find the file
1477-
if (IsValidFilePath(strFilename.c_str()) && GetFilePath(strFilename.c_str(), strFullFilename))
1477+
std::vector<std::string> vecFiles = GetFilePaths(strFilename.c_str());
1478+
if (vecFiles.empty())
14781479
{
1479-
// This one is supposed to be default, but there's already a default page
1480-
if (bFoundDefault && bIsDefault)
1480+
if (glob::has_magic(strFilename))
14811481
{
1482-
CLogger::LogPrintf("Only one html item can be default per resource, ignoring %s in %s\n", strFilename.c_str(),
1483-
m_strResourceName.c_str());
1484-
bIsDefault = false;
1482+
m_ResourceFilesCountPerDir[strFilename] = vecFiles.size();
1483+
continue;
14851484
}
14861485

1487-
// If this is supposed to be default, we've now found our default page
1488-
if (bIsDefault)
1489-
bFoundDefault = true;
1490-
1491-
// Create a new resource HTML file and add it to the list
1492-
auto pResourceFile = new CResourceHTMLItem(this, strFilename.c_str(), strFullFilename.c_str(), &Attributes, bIsDefault, bIsRaw,
1493-
bIsRestricted, m_bOOPEnabledInMetaXml);
1494-
m_ResourceFiles.push_back(pResourceFile);
1495-
1496-
// This is the first HTML file? Remember it
1497-
if (!pFirstHTML)
1498-
pFirstHTML = pResourceFile;
1499-
}
1500-
else
1501-
{
15021486
m_strFailureReason = SString("Couldn't find html %s for resource %s\n", strFilename.c_str(), m_strResourceName.c_str());
15031487
CLogger::ErrorPrintf(m_strFailureReason);
15041488
return false;
15051489
}
1490+
1491+
for (const std::string& strFilePath : vecFiles)
1492+
{
1493+
std::string strFullFilename;
1494+
1495+
if (GetFilePath(strFilePath.c_str(), strFullFilename))
1496+
{
1497+
// This one is supposed to be default, but there's already a default page
1498+
if (bFoundDefault && bIsDefault)
1499+
{
1500+
CLogger::LogPrintf("Only one html item can be default per resource, ignoring %s in %s\n", strFilename.c_str(), m_strResourceName.c_str());
1501+
bIsDefault = false;
1502+
}
1503+
1504+
// If this is supposed to be default, we've now found our default page
1505+
if (bIsDefault)
1506+
bFoundDefault = true;
1507+
1508+
// Create a new resource HTML file and add it to the list
1509+
auto pResourceFile = new CResourceHTMLItem(this, strFilename.c_str(), strFullFilename.c_str(), &Attributes, bIsDefault, bIsRaw, bIsRestricted, m_bOOPEnabledInMetaXml);
1510+
m_ResourceFiles.push_back(pResourceFile);
1511+
1512+
// This is the first HTML file? Remember it
1513+
if (!pFirstHTML)
1514+
pFirstHTML = pResourceFile;
1515+
}
1516+
}
15061517
}
15071518
else
15081519
{

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.11+g57354b8+chromium-129.0.6668.90"
13-
local CEF_HASH = "a3e3e7add2235d1865a8570522ff87dba392e7b2d15bca0983ed2ebe19ea048b"
12+
local CEF_VERSION = "129.0.12+gf09539f+chromium-129.0.6668.101"
13+
local CEF_HASH = "ec759dbfafafac2ae26f4960caad1c8464205a7787ec247e0fc21ab4620c8a5c"
1414

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

0 commit comments

Comments
 (0)