Skip to content

Commit 5c137e2

Browse files
authored
Merge branch 'master' into client_c20
2 parents 56990d5 + 55d3922 commit 5c137e2

35 files changed

+2385
-1998
lines changed

Client/cefweb/CWebApp.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ CefRefPtr<CefResourceHandler> CWebApp::HandleError(const SString& strError, unsi
2121

2222
void CWebApp::OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr<CefCommandLine> command_line)
2323
{
24-
command_line->AppendSwitch("disable-gpu-compositing");
25-
command_line->AppendSwitch("disable-gpu");
2624
// command_line->AppendSwitch("disable-d3d11");
2725
command_line->AppendSwitch("enable-begin-frame-scheduling");
2826

Client/core/CNickGen.cpp

Lines changed: 169 additions & 171 deletions
Large diffs are not rendered by default.

Client/core/CQueryReceiver.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ SQueryInfo CQueryReceiver::GetServerResponse()
183183

184184
// Recover server ping status if present
185185
const SString strPingStatus = strBuildNumber.Right(strBuildNumber.length() - strlen(strBuildNumber) - 1);
186-
CCore::GetSingleton().GetNetwork()->UpdatePingStatus(*strPingStatus, info.players);
186+
CCore::GetSingleton().GetNetwork()->UpdatePingStatus(*strPingStatus, info.players, info.isStatusVerified);
187187

188188
// Recover server http port if present
189189
const SString strNetRoute = strPingStatus.Right(strPingStatus.length() - strlen(strPingStatus) - 1);
@@ -213,7 +213,15 @@ SQueryInfo CQueryReceiver::GetServerResponse()
213213
return info;
214214
}
215215
}
216+
216217
InvalidateSocket();
218+
219+
if (info.players > info.playerSlot)
220+
{
221+
info.players = info.playerSlot;
222+
info.isStatusVerified = false;
223+
}
224+
217225
info.containingInfo = true;
218226
}
219227

Client/core/CQueryReceiver.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ struct SQueryInfo
1616
{
1717
containingInfo = false;
1818
port = 0;
19+
isStatusVerified = true;
1920
isPassworded = false;
2021
serials = false;
2122
players = 0;
@@ -33,6 +34,7 @@ struct SQueryInfo
3334
SString gameType;
3435
SString mapName;
3536
SString versionText;
37+
bool isStatusVerified;
3638
bool isPassworded;
3739
bool serials;
3840
ushort players;

Client/core/ServerBrowser/CServerBrowser.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,8 @@ void CServerBrowser::AddServerToList(CServerListItem* pServer, const ServerBrows
10811081
const std::string strVersion = !bIncludeOtherVersions ? "" : pServer->strVersion;
10821082
const std::string strVersionSortKey = pServer->strVersionSortKey + pServer->strTieBreakSortKey;
10831083

1084-
const std::string strPlayers = pServer->nMaxPlayers == 0 ? "" : std::format("{} / {}", pServer->nPlayers, pServer->nMaxPlayers);
1084+
const std::string strVerified = pServer->isStatusVerified ? "" : "*";
1085+
const std::string strPlayers = pServer->nMaxPlayers == 0 ? "" : std::format("{} / {} {}", pServer->nPlayers, pServer->nMaxPlayers, strVerified);
10851086
const std::string strPlayersSortKey = std::format("{:04d}-{}", pServer->nMaxPlayers ? pServer->nPlayers + 1 : 0, pServer->strTieBreakSortKey);
10861087

10871088
const std::string strPing = pServer->nPing == 9999 ? "" : std::to_string(pServer->nPing);
@@ -1125,6 +1126,12 @@ void CServerBrowser::AddServerToList(CServerListItem* pServer, const ServerBrows
11251126
m_pServerList[Type]->SetItemColor(iIndex, m_hPing[Type], color.R, color.G, color.B, color.A);
11261127
m_pServerList[Type]->SetItemColor(iIndex, m_hGame[Type], color.R, color.G, color.B, color.A);
11271128

1129+
if (!pServer->isStatusVerified)
1130+
{
1131+
SColor orange = SColorRGBA(230, 200, 180, color.A);
1132+
m_pServerList[Type]->SetItemColor(iIndex, m_hPlayers[Type], orange.R, orange.G, orange.B, orange.A);
1133+
}
1134+
11281135
// If the index was modified from the original, then update all indexes because it means there was some sort
11291136
if (pServer->iRowIndex != iIndex)
11301137
UpdateRowIndexMembers(Type);

Client/core/ServerBrowser/CServerInfo.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,13 +469,15 @@ void CServerInfo::Connect()
469469

470470
void CServerInfo::ResetServerGUI(CServerListItem* pServer)
471471
{
472+
const SString strVerified = pServer->isStatusVerified ? "" : "*";
473+
472474
// Set our GUI elements to display the server information
473475
m_pServerNameLabel->SetText(pServer->strName.c_str());
474476
m_pServerAddressLabel->SetText(pServer->strEndpoint.c_str());
475477
m_pGamemodeLabel->SetText(pServer->strGameMode.c_str());
476478
m_pMapLabel->SetText(pServer->strMap.c_str());
477-
m_pPlayersLabel->SetText(SString("%i/%i", pServer->nPlayers, pServer->nMaxPlayers).c_str());
478-
479+
m_pPlayersLabel->SetText(SString("%d / %d %s", pServer->nPlayers, pServer->nMaxPlayers, *strVerified).c_str());
480+
479481
m_pPasswordedLabel->SetText(pServer->bPassworded ? _("Yes") : _("No"));
480482
m_pLatencyLabel->SetText(SString("%i", pServer->nPing));
481483

Client/core/ServerBrowser/CServerList.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ bool CServerListItem::ParseQuery()
514514
if ((uiMasterServerSaysRestrictions & RESTRICTION_PLAYER_LIST) == false)
515515
vecPlayers = info.playersPool;
516516

517+
isStatusVerified = info.isStatusVerified;
517518
bScanned = true;
518519

519520
PostChange();

Client/core/ServerBrowser/CServerList.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ class CServerListItem
139139
bScanned = false;
140140
bSkipped = false;
141141
bSerials = false;
142+
isStatusVerified = true;
142143
bPassworded = false;
143144
bKeepFlag = false;
144145
iRowIndex = -1;
@@ -182,6 +183,7 @@ class CServerListItem
182183
unsigned short nPlayers; // Current players
183184
unsigned short nMaxPlayers; // Maximum players
184185
unsigned short nPing; // Ping time
186+
bool isStatusVerified; // Ping status verified
185187
bool bPassworded; // Password protected
186188
bool bSerials; // Serial verification on
187189
bool bScanned;

Client/game_sa/CAutomobileSA.h

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,6 @@
2121
#define MAX_PASSENGER_COUNT 8
2222
#define MAX_DOORS 6 // also in CDamageManager
2323

24-
namespace eCarNode
25-
{
26-
enum
27-
{
28-
NONE = 0,
29-
CHASSIS = 1,
30-
WHEEL_RF = 2,
31-
WHEEL_RM = 3,
32-
WHEEL_RB = 4,
33-
WHEEL_LF = 5,
34-
WHEEL_LM = 6,
35-
WHEEL_LB = 7,
36-
DOOR_RF = 8,
37-
DOOR_RR = 9,
38-
DOOR_LF = 10,
39-
DOOR_LR = 11,
40-
BUMP_FRONT = 12,
41-
BUMP_REAR = 13,
42-
WING_RF = 14,
43-
WING_LF = 15,
44-
BONNET = 16,
45-
BOOT = 17,
46-
WINDSCREEN = 18,
47-
EXHAUST = 19,
48-
MISC_A = 20,
49-
MISC_B = 21,
50-
MISC_C = 22,
51-
MISC_D = 23,
52-
MISC_E = 24,
53-
NUM_NODES
54-
};
55-
};
56-
5724
class CBouncingPanelSAInterface
5825
{
5926
public:
@@ -70,7 +37,7 @@ class CAutomobileSAInterface : public CVehicleSAInterface
7037
public:
7138
CDamageManagerSAInterface m_damageManager;
7239
CDoorSAInterface m_doors[MAX_DOORS];
73-
RwFrame* m_aCarNodes[eCarNode::NUM_NODES];
40+
RwFrame* m_aCarNodes[static_cast<std::size_t>(eCarNodes::NUM_NODES)];
7441
CBouncingPanelSAInterface m_panels[3];
7542
CDoorSAInterface m_swingingChassis;
7643
CColPointSAInterface m_wheelColPoint[MAX_WHEELS];

Client/game_sa/CBikeSA.h

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@
1414
#include <game/CBike.h>
1515
#include "CVehicleSA.h"
1616

17+
enum class eBikeNodes
18+
{
19+
NONE = 0,
20+
CHASSIS,
21+
FORKS_FRONT,
22+
FORKS_REAR,
23+
WHEEL_FRONT,
24+
WHEEL_REAR,
25+
MUDGUARD,
26+
HANDLEBARS,
27+
MISC_A,
28+
MISC_B,
29+
30+
NUM_NODES
31+
};
32+
1733
struct sRideAnimData
1834
{
1935
int32 iAnimGroup;
@@ -29,7 +45,7 @@ static_assert(sizeof(sRideAnimData) == 0x1C, "Invalid size for sRideAnimData");
2945
class CBikeSAInterface : public CVehicleSAInterface
3046
{
3147
public:
32-
int32 m_apModelNodes[10];
48+
RwFrame* m_apModelNodes[static_cast<std::size_t>(eBikeNodes::NUM_NODES)];
3349
int8 m_bLeanMatrixCalculated;
3450
int8 pad0[3]; // Maybe prev value is int32
3551
int8 m_mLeanMatrix[72];

0 commit comments

Comments
 (0)