Skip to content

Commit 3395285

Browse files
author
Ibra
committed
fix: Correct avgFPS reporting in the network stats overlay
1 parent 2f3f1e9 commit 3395285

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

Core/GameEngine/Source/GameNetwork/FrameMetrics.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ FrameMetrics::~FrameMetrics() {
8484
}
8585

8686
void FrameMetrics::init() {
87+
#if defined(GENERALS_ONLINE_HIGH_FPS_SERVER)
88+
m_averageFps = GENERALS_ONLINE_HIGH_FPS_LIMIT;
89+
#else
8790
m_averageFps = 30;
91+
#endif
8892

8993
#if defined(GENERALS_ONLINE)
9094
// NGMP_NOTE: Don't start with the assumption that we have latency. Connections are now formed earlier, so we have latency data earlier too.
@@ -113,7 +117,11 @@ void FrameMetrics::init() {
113117

114118
UnsignedInt i = 0;
115119
for (; i < TheGlobalData->m_networkFPSHistoryLength; ++i) {
116-
m_fpsList[i] = 30.0;
120+
#if defined(GENERALS_ONLINE_HIGH_FPS_SERVER)
121+
m_fpsList[i] = GENERALS_ONLINE_HIGH_FPS_LIMIT;
122+
#else
123+
m_fpsList[i] = 30.0;
124+
#endif
117125
}
118126
m_fpsListIndex = 0;
119127
for (i = 0; i < TheGlobalData->m_networkLatencyHistoryLength; ++i)

GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7231,7 +7231,7 @@ void InGameUI::drawGameTime()
72317231
m_gameTimeString->getSize(&w, &h);
72327232

72337233
bool bIsHighQuality = true;
7234-
if (avgFPS < GENERALS_ONLINE_HIGH_FPS_LIMIT || status.m_cbSentUnackedReliable >= 1000 || (status.m_flConnectionQualityLocal != -1.f && status.m_flConnectionQualityLocal < 1.f) || (status.m_flConnectionQualityRemote != -1.f && status.m_flConnectionQualityRemote < 1.f))
7234+
if (avgFPS < (GENERALS_ONLINE_HIGH_FPS_LIMIT - 1) || status.m_cbSentUnackedReliable >= 1000 || (status.m_flConnectionQualityLocal != -1.f && status.m_flConnectionQualityLocal < 1.f) || (status.m_flConnectionQualityRemote != -1.f && status.m_flConnectionQualityRemote < 1.f))
72357235
{
72367236
bIsHighQuality = false;
72377237
}

0 commit comments

Comments
 (0)