Skip to content

Commit 42617b9

Browse files
authored
Merge branch 'master' into add-vehicle-sirens
2 parents bf5598d + 55d3922 commit 42617b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2658
-2133
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/CCore.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,6 +1869,13 @@ void CCore::RecalculateFrameRateLimit(uint uiServerFrameRateLimit, bool bLogToCo
18691869
if ((m_uiFrameRateLimit == 0 || uiClientScriptRate < m_uiFrameRateLimit) && uiClientScriptRate > 0)
18701870
m_uiFrameRateLimit = uiClientScriptRate;
18711871

1872+
// Removes Limiter from Frame Graph if limit is zero and skips frame limit
1873+
if (m_uiFrameRateLimit == 0)
1874+
{
1875+
m_bQueuedFrameRateValid = false;
1876+
GetGraphStats()->RemoveTimingPoint("Limiter");
1877+
}
1878+
18721879
// Print new limits to the console
18731880
if (bLogToConsole)
18741881
{

Client/core/CGraphStats.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class CGraphStats : public CGraphStatsInterface
3939
virtual void SetEnabled(bool bEnabled);
4040
virtual bool IsEnabled();
4141
virtual void AddTimingPoint(const char* szName);
42+
virtual void RemoveTimingPoint(const char* szName);
4243

4344
protected:
4445
bool m_bEnabled;
@@ -189,6 +190,21 @@ void CGraphStats::AddTimingPoint(const char* szName)
189190
pLine->dataHistory[pLine->iDataPos] = AvgData;
190191
}
191192

193+
///////////////////////////////////////////////////////////////
194+
//
195+
// CGraphStats::RemoveTimingPoint
196+
//
197+
//
198+
//
199+
///////////////////////////////////////////////////////////////
200+
void CGraphStats::RemoveTimingPoint(const char* szName)
201+
{
202+
if (!IsEnabled() || szName[0] == 0)
203+
return;
204+
205+
MapRemove(m_LineList, szName);
206+
}
207+
192208
///////////////////////////////////////////////////////////////
193209
//
194210
// CGraphStats::Draw

Client/core/CGraphStats.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class CGraphStatsInterface
2323
virtual void SetEnabled(bool bEnabled) = 0;
2424
virtual bool IsEnabled() = 0;
2525
virtual void AddTimingPoint(const char* szName) = 0;
26+
virtual void RemoveTimingPoint(const char* szName) = 0;
2627
};
2728

2829
CGraphStatsInterface* GetGraphStats();

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/CVersionUpdater.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,7 @@ void CVersionUpdater::_DialogUpdateQueryError()
19121912
// Display message
19131913
GetQuestionBox().Reset();
19141914
GetQuestionBox().SetTitle(_("UPDATE CHECK"));
1915-
GetQuestionBox().SetMessage(_("Update not currently avalable.\n\nPlease check www.mtasa.com"));
1915+
GetQuestionBox().SetMessage(_("An update is currently not available.\n\nPlease check www.mtasa.com"));
19161916
GetQuestionBox().SetButton(0, _("OK"));
19171917
GetQuestionBox().Show();
19181918
_PollAnyButton();

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 SString strVersion = !bIncludeOtherVersions ? "" : pServer->strVersion;
10821082
const SString strVersionSortKey = pServer->strVersionSortKey + pServer->strTieBreakSortKey;
10831083

1084-
const SString strPlayers = pServer->nMaxPlayers == 0 ? "" : SString("%d / %d", pServer->nPlayers, pServer->nMaxPlayers);
1084+
const SString strVerified = pServer->isStatusVerified ? "" : "*";
1085+
const SString strPlayers = pServer->nMaxPlayers == 0 ? "" : SString("%d / %d %s", pServer->nPlayers, pServer->nMaxPlayers, *strVerified);
10851086
const SString strPlayersSortKey = SString("%04d-", pServer->nMaxPlayers ? pServer->nPlayers + 1 : 0) + pServer->strTieBreakSortKey;
10861087

10871088
const SString strPing = pServer->nPing == 9999 ? "" : SString("%d", 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

0 commit comments

Comments
 (0)