This repository was archived by the owner on Jan 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -1737,7 +1737,10 @@ namespace RTE {
1737
1737
double compressionRatio = (m_DataUncompressedTotal[i] > 0 ) ? static_cast <double >(m_DataSentTotal[i]) / static_cast <double >(m_DataUncompressedTotal[i]) : 0 ;
1738
1738
double emptyRatio = (m_EmptyBlocks[i] > 0 ) ? static_cast <double >(m_FullBlocks[i]) / static_cast <double >(m_EmptyBlocks[i]) : 0 ;
1739
1739
1740
- std::string playerName = IsPlayerConnected (i) ? GetPlayerName (i) : " - NO PLAYER -" ;
1740
+ std::string playerName = " - NO PLAYER - " ;
1741
+ if (IsPlayerConnected (i)) {
1742
+ playerName = GetPlayerName (i);
1743
+ }
1741
1744
1742
1745
// Jesus christ
1743
1746
std::snprintf (buf, sizeof (buf),
@@ -1747,18 +1750,18 @@ namespace RTE {
1747
1750
" R : % .2f\n "
1748
1751
" Full Blck %lu (%.1f Kb)\n "
1749
1752
" Empty Blck %lu (%.1f Kb)\n "
1750
- " Frame Kb : % lu\n "
1751
- " Glow Kb : % lu\n "
1752
- " Sound Kb : % lu\n "
1753
- " Scene Kb : % lu\n "
1754
- " Frames sent : % uK\n "
1755
- " Frame skipped : % uK\n "
1756
- " Blocks full : % uK\n "
1757
- " Blocks empty : % uK\n "
1753
+ " Frame Kb : %lu\n "
1754
+ " Glow Kb : %lu\n "
1755
+ " Sound Kb : %lu\n "
1756
+ " Scene Kb : %lu\n "
1757
+ " Frames sent : %uK\n "
1758
+ " Frame skipped : %uK\n "
1759
+ " Blocks full : %uK\n "
1760
+ " Blocks empty : %uK\n "
1758
1761
" Blk Ratio : % .2f\n "
1759
1762
" Frames ms : % d\n "
1760
1763
" Send ms % d\n "
1761
- " Total Data % lu MB" ,
1764
+ " Total Data %lu MB" ,
1762
1765
1763
1766
(i == c_MaxClients) ? " - TOTALS - " : playerName.c_str (),
1764
1767
(i < c_MaxClients) ? m_Ping[i] : 0 ,
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ namespace RTE {
219
219
220
220
std::string m_ServerPort; // !<
221
221
222
- ClientConnection m_ClientConnections[ c_MaxClients] ; // !<
222
+ std::array< ClientConnection, c_MaxClients> m_ClientConnections ; // !<
223
223
224
224
bool m_UseNATService; // !< Whether a NAT service is used for punch-through.
225
225
RakNet::NatPunchthroughClient m_NATPunchthroughClient; // !<
@@ -280,8 +280,8 @@ namespace RTE {
280
280
281
281
unsigned char m_SceneID; // !<
282
282
283
- bool m_EndActivityVotes[ c_MaxClients] ; // !< Votes from each player required to return to the Multiplayer Lobby.
284
- bool m_RestartActivityVotes[ c_MaxClients] ; // !< Votes from each player required to restart the current activity.
283
+ std::array< bool , c_MaxClients> m_EndActivityVotes ; // !< Votes from each player required to return to the Multiplayer Lobby.
284
+ std::array< bool , c_MaxClients> m_RestartActivityVotes ; // !< Votes from each player required to restart the current activity.
285
285
286
286
long long m_LatestRestartTime; // !< The time, in ticks, that the last activity restart took place on the server.
287
287
You can’t perform that action at this time.
0 commit comments