@@ -17,9 +17,9 @@ public class NetworkInfo : NetworkEventsListener
17
17
public float MediumPacketLossThreshold = 1 ;
18
18
public float HighPacketLossThreshold = 10 ;
19
19
20
- public Vector2 Icon1Offset = new Vector2 ( - 80 , 30 ) ;
21
- public Vector2 Icon2Offset = new Vector2 ( - 80 , 70 ) ;
22
- public Vector2 Icon3Offset = new Vector2 ( - 80 , 110 ) ;
20
+ public Vector2 PacketLossIconOffset = new Vector2 ( - 80 , 30 ) ;
21
+ public Vector2 LatencyIconOffset = new Vector2 ( - 80 , 70 ) ;
22
+ public Vector2 ServerLagIconOffset = new Vector2 ( - 80 , 110 ) ;
23
23
public float IconSize = 30 ;
24
24
25
25
private Texture _packetLossIcon ;
@@ -62,9 +62,9 @@ private void DrawText(int offset, string title, string content, string unit)
62
62
63
63
public void DrawIcons ( )
64
64
{
65
- var pktLossIconPos = Icon1Offset + ( Screen . width * Vector2 . right ) ;
66
- var latencyIconPos = Icon2Offset + ( Screen . width * Vector2 . right ) ;
67
- var serverLagIconPos = Icon3Offset + ( Screen . width * Vector2 . right ) ;
65
+ var pktLossIconPos = PacketLossIconOffset + ( Screen . width * Vector2 . right ) ;
66
+ var latencyIconPos = LatencyIconOffset + ( Screen . width * Vector2 . right ) ;
67
+ var serverLagIconPos = ServerLagIconOffset + ( Screen . width * Vector2 . right ) ;
68
68
69
69
var pktLoss = Mathf . Max ( Sandbox . InPacketLoss , Sandbox . OutPacketLoss ) * 100 ; // multiplying by 100 to convert from a decimal to a percentage.
70
70
var rtt = Sandbox . RTT * 1000f ; // multiplying by 1000 to convert from seconds to milliseconds.
0 commit comments