@@ -67,7 +67,7 @@ private void Update()
67
67
else
68
68
{
69
69
var proximityClients = new List < ulong > ( ) ;
70
- foreach ( KeyValuePair < ulong , NetworkClient > client in NetworkManager . Singleton . ConnectedClients )
70
+ foreach ( KeyValuePair < ulong , NetworkClient > client in NetworkManager . ConnectedClients )
71
71
{
72
72
if ( client . Value . PlayerObject == null || Vector3 . Distance ( client . Value . PlayerObject . transform . position , transform . position ) <= ProximityRange )
73
73
{
@@ -79,7 +79,7 @@ private void Update()
79
79
}
80
80
}
81
81
82
- if ( NetworkManager . Singleton . NetworkTime - m_LastCorrectionTime >= CorrectionDelay )
82
+ if ( NetworkManager . NetworkTime - m_LastCorrectionTime >= CorrectionDelay )
83
83
{
84
84
if ( ! EnableProximity )
85
85
{
@@ -88,7 +88,7 @@ private void Update()
88
88
else
89
89
{
90
90
var proximityClients = new List < ulong > ( ) ;
91
- foreach ( KeyValuePair < ulong , NetworkClient > client in NetworkManager . Singleton . ConnectedClients )
91
+ foreach ( KeyValuePair < ulong , NetworkClient > client in NetworkManager . ConnectedClients )
92
92
{
93
93
if ( client . Value . PlayerObject == null || Vector3 . Distance ( client . Value . PlayerObject . transform . position , transform . position ) <= ProximityRange )
94
94
{
@@ -99,7 +99,7 @@ private void Update()
99
99
OnNavMeshCorrectionUpdateClientRpc ( m_Agent . velocity , transform . position , new ClientRpcParams { Send = new ClientRpcSendParams { TargetClientIds = proximityClients . ToArray ( ) } } ) ;
100
100
}
101
101
102
- m_LastCorrectionTime = NetworkManager . Singleton . NetworkTime ;
102
+ m_LastCorrectionTime = NetworkManager . NetworkTime ;
103
103
}
104
104
}
105
105
0 commit comments