diff options
| author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-11-12 11:09:29 +0200 | 
|---|---|---|
| committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-11-12 11:09:29 +0200 | 
| commit | a325ad8fbddf52e479ef1c86da59495e66aac679 (patch) | |
| tree | c4743b76363b9acd10b71d4e508c548feec49854 /indra | |
| parent | c0ae1fe956566d9ee40301e4009a0882c971a61b (diff) | |
MAINT-4662 FIXED Packet Loss always shows zero in the statistics floater
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/newview/llworld.cpp | 7 | ||||
| -rwxr-xr-x | indra/newview/skins/default/xui/en/floater_stats.xml | 1 | 
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index b4e8114a5f..315af3f942 100755 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -796,9 +796,12 @@ void LLWorld::updateNetStats()  	add(LLStatViewer::PACKETS_IN, packets_in);  	add(LLStatViewer::PACKETS_OUT, packets_out);  	add(LLStatViewer::PACKETS_LOST, packets_lost); -	if (packets_in) + +	F32 total_packets_in = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_IN); +	if (total_packets_in > 0)  	{ -		sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)packets_lost/(F32)packets_in)); +		F32 total_packets_lost = LLViewerStats::instance().getRecording().getSum(LLStatViewer::PACKETS_LOST); +		sample(LLStatViewer::PACKETS_LOST_PERCENT, LLUnits::Ratio::fromValue((F32)total_packets_lost/(F32)total_packets_in));  	}  	mLastPacketsIn = gMessageSystem->mPacketsIn; diff --git a/indra/newview/skins/default/xui/en/floater_stats.xml b/indra/newview/skins/default/xui/en/floater_stats.xml index 2aa582beea..90f9591f29 100755 --- a/indra/newview/skins/default/xui/en/floater_stats.xml +++ b/indra/newview/skins/default/xui/en/floater_stats.xml @@ -41,6 +41,7 @@                    show_bar="true"/>          <stat_bar name="packet_loss"                    label="Packet Loss" +                  decimal_digits="1"                    stat="packetslostpercentstat"/>          <stat_bar name="ping"                    label="Ping Sim"  | 
