mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-24 21:13:01 +00:00
fix ping sending frequency
This commit is contained in:
parent
8318a67912
commit
550c6544f7
1 changed files with 3 additions and 1 deletions
|
@ -99,6 +99,9 @@ namespace SanAndreasUnity.Net
|
|||
F.InvokeEventExceptionSafe(this.onServerStatusChanged);
|
||||
}
|
||||
|
||||
// we need more agile ping measurement
|
||||
// the reason we assign this here, is because Mirror resets the value after scene load
|
||||
Mirror.NetworkTime.PingFrequency = 0.5f;
|
||||
}
|
||||
|
||||
|
||||
|
@ -160,7 +163,6 @@ namespace SanAndreasUnity.Net
|
|||
CheckIfIPAddressIsValid (ip);
|
||||
CheckIfPortIsValid (serverPortNumber);
|
||||
SetupNetworkManger( ip, serverPortNumber );
|
||||
Mirror.NetworkTime.PingFrequency = 0.5f; // we need more agile ping measurement
|
||||
NetworkManager.singleton.StartClient ();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue