Skip to content

Commit 75e9151

Browse files
committed
refactor(prototype): Updated Invoke methods to use non obsolete versions
1 parent 8442aac commit 75e9151

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

MLAPI/MonoBehaviours/Prototyping/NetworkedAnimator.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,16 @@ private void FixedUpdate()
127127
if (Vector3.Distance(transform.position, client.Value.PlayerObject.transform.position) <= ProximityRange)
128128
clientsInProximity.Add(client.Key);
129129
}
130-
InvokeClientRpc(ApplyAnimParamMsg, clientsInProximity, stream);
130+
InvokeClientRpcPerformance(ApplyAnimParamMsg, clientsInProximity, stream);
131131
}
132132
else
133133
{
134-
InvokeClientRpcOnEveryoneExcept(ApplyAnimMsg, OwnerClientId, stream);
134+
InvokeClientRpcOnEveryoneExceptPerformance(ApplyAnimMsg, OwnerClientId, stream);
135135
}
136136
}
137137
else
138138
{
139-
InvokeServerRpc(SubmitAnimMsg, stream);
139+
InvokeServerRpcPerformance(SubmitAnimMsg, stream);
140140
}
141141
}
142142
}
@@ -199,16 +199,16 @@ private void CheckSendRate()
199199
if (Vector3.Distance(transform.position, client.Value.PlayerObject.transform.position) <= ProximityRange)
200200
clientsInProximity.Add(client.Key);
201201
}
202-
InvokeClientRpc(ApplyAnimParamMsg, clientsInProximity, stream);
202+
InvokeClientRpcPerformance(ApplyAnimParamMsg, clientsInProximity, stream);
203203
}
204204
else
205205
{
206-
InvokeClientRpcOnEveryoneExcept(ApplyAnimParamMsg, OwnerClientId, stream);
206+
InvokeClientRpcOnEveryoneExceptPerformance(ApplyAnimParamMsg, OwnerClientId, stream);
207207
}
208208
}
209209
else
210210
{
211-
InvokeServerRpc(SubmitAnimParamMsg, stream);
211+
InvokeServerRpcPerformance(SubmitAnimParamMsg, stream);
212212
}
213213
}
214214
}
@@ -252,11 +252,11 @@ private void SubmitAnimMsg(uint clientId, Stream stream)
252252
if (Vector3.Distance(transform.position, client.Value.PlayerObject.transform.position) <= ProximityRange)
253253
clientsInProximity.Add(client.Key);
254254
}
255-
InvokeClientRpc(ApplyAnimMsg, clientsInProximity, stream);
255+
InvokeClientRpcPerformance(ApplyAnimMsg, clientsInProximity, stream);
256256
}
257257
else
258258
{
259-
InvokeClientRpcOnEveryoneExcept(ApplyAnimMsg, OwnerClientId, stream);
259+
InvokeClientRpcOnEveryoneExceptPerformance(ApplyAnimMsg, OwnerClientId, stream);
260260
}
261261
}
262262

@@ -286,11 +286,11 @@ private void SubmitAnimParamMsg(uint clientId, Stream stream)
286286
if (Vector3.Distance(transform.position, client.Value.PlayerObject.transform.position) <= ProximityRange)
287287
clientsInProximity.Add(client.Key);
288288
}
289-
InvokeClientRpc(ApplyAnimParamMsg, clientsInProximity, stream);
289+
InvokeClientRpcPerformance(ApplyAnimParamMsg, clientsInProximity, stream);
290290
}
291291
else
292292
{
293-
InvokeClientRpcOnEveryoneExcept(ApplyAnimParamMsg, OwnerClientId, stream);
293+
InvokeClientRpcOnEveryoneExceptPerformance(ApplyAnimParamMsg, OwnerClientId, stream);
294294
}
295295
}
296296

@@ -311,11 +311,11 @@ private void SubmitAnimTriggerMsg(uint clientId, Stream stream)
311311
if (Vector3.Distance(transform.position, client.Value.PlayerObject.transform.position) <= ProximityRange)
312312
clientsInProximity.Add(client.Key);
313313
}
314-
InvokeClientRpc(ApplyAnimTriggerMsg, clientsInProximity, stream);
314+
InvokeClientRpcPerformance(ApplyAnimTriggerMsg, clientsInProximity, stream);
315315
}
316316
else
317317
{
318-
InvokeClientRpcOnEveryoneExcept(ApplyAnimTriggerMsg, OwnerClientId, stream);
318+
InvokeClientRpcOnEveryoneExceptPerformance(ApplyAnimTriggerMsg, OwnerClientId, stream);
319319
}
320320
}
321321

@@ -438,16 +438,16 @@ public void SetTrigger(int hash)
438438
if (Vector3.Distance(transform.position, client.Value.PlayerObject.transform.position) <= ProximityRange)
439439
clientsInProximity.Add(client.Key);
440440
}
441-
InvokeClientRpc(ApplyAnimTriggerMsg, clientsInProximity, stream);
441+
InvokeClientRpcPerformance(ApplyAnimTriggerMsg, clientsInProximity, stream);
442442
}
443443
else
444444
{
445-
InvokeClientRpcOnEveryoneExcept(ApplyAnimTriggerMsg, OwnerClientId, stream);
445+
InvokeClientRpcOnEveryoneExceptPerformance(ApplyAnimTriggerMsg, OwnerClientId, stream);
446446
}
447447
}
448448
else
449449
{
450-
InvokeServerRpc(SubmitAnimTriggerMsg, stream);
450+
InvokeServerRpcPerformance(SubmitAnimTriggerMsg, stream);
451451
}
452452
}
453453
}

MLAPI/MonoBehaviours/Prototyping/NetworkedNavMeshAgent.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private void Update()
7272

7373
if (!EnableProximity)
7474
{
75-
InvokeClientRpcOnEveryone(OnNavMeshStateUpdate, stream);
75+
InvokeClientRpcOnEveryonePerformance(OnNavMeshStateUpdate, stream);
7676
}
7777
else
7878
{
@@ -82,7 +82,7 @@ private void Update()
8282
if (Vector3.Distance(client.Value.PlayerObject.transform.position, transform.position) <= ProximityRange)
8383
proximityClients.Add(client.Key);
8484
}
85-
InvokeClientRpc(OnNavMeshStateUpdate, proximityClients, stream);
85+
InvokeClientRpcPerformance(OnNavMeshStateUpdate, proximityClients, stream);
8686
}
8787
}
8888
}
@@ -105,7 +105,7 @@ private void Update()
105105

106106
if (!EnableProximity)
107107
{
108-
InvokeClientRpcOnEveryone(OnNavMeshCorrectionUpdate, stream);
108+
InvokeClientRpcOnEveryonePerformance(OnNavMeshCorrectionUpdate, stream);
109109
}
110110
else
111111
{
@@ -115,7 +115,7 @@ private void Update()
115115
if (Vector3.Distance(client.Value.PlayerObject.transform.position, transform.position) <= ProximityRange)
116116
proximityClients.Add(client.Key);
117117
}
118-
InvokeClientRpc(OnNavMeshCorrectionUpdate, proximityClients, stream);
118+
InvokeClientRpcPerformance(OnNavMeshCorrectionUpdate, proximityClients, stream);
119119
}
120120
}
121121
}

MLAPI/MonoBehaviours/Prototyping/NetworkedTransform.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ private void Update()
157157
writer.WriteSinglePacked(transform.rotation.eulerAngles.z);
158158

159159
if (IsServer)
160-
InvokeClientRpcOnEveryoneExcept(ApplyTransform, OwnerClientId, stream);
160+
InvokeClientRpcOnEveryoneExceptPerformance(ApplyTransform, OwnerClientId, stream);
161161
else
162-
InvokeServerRpc(SubmitTransform, stream);
162+
InvokeServerRpcPerformance(SubmitTransform, stream);
163163
}
164164
}
165165

@@ -285,7 +285,7 @@ private void SubmitTransform(uint clientId, Stream stream)
285285
info.lastMissedPosition = null;
286286
info.lastMissedRotation = null;
287287

288-
InvokeClientRpcOnClient(ApplyTransform, NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, writeStream);
288+
InvokeClientRpcOnClientPerformance(ApplyTransform, NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, writeStream);
289289
}
290290
else
291291
{
@@ -296,7 +296,7 @@ private void SubmitTransform(uint clientId, Stream stream)
296296
}
297297
else
298298
{
299-
InvokeClientRpcOnEveryoneExcept(ApplyTransform, OwnerClientId, writeStream);
299+
InvokeClientRpcOnEveryoneExceptPerformance(ApplyTransform, OwnerClientId, writeStream);
300300
}
301301
}
302302
}
@@ -342,7 +342,7 @@ private void CheckForMissedSends()
342342
writer.WriteSinglePacked(rot.y);
343343
writer.WriteSinglePacked(rot.z);
344344

345-
InvokeClientRpcOnClient(ApplyTransform, NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, stream);
345+
InvokeClientRpcOnClientPerformance(ApplyTransform, NetworkingManager.Singleton.ConnectedClientsList[i].ClientId, stream);
346346
}
347347
}
348348
}

0 commit comments

Comments
 (0)