mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
UpdateServer checks if should sync in general
This commit is contained in:
parent
4612bc2e17
commit
adde49a423
@ -349,8 +349,7 @@ void UpdateServerDelta()
|
||||
// authoritative movement done by the host will have to be broadcasted
|
||||
// here by checking IsClientWithAuthority.
|
||||
// TODO send same time that NetworkServer sends time snapshot?
|
||||
if (NetworkTime.localTime >= lastServerSendTime + sendInterval && // CUSTOM CHANGE: allow custom sendRate + sendInterval again
|
||||
(syncDirection == SyncDirection.ServerToClient || IsClientWithAuthority))
|
||||
if (NetworkTime.localTime >= lastServerSendTime + sendInterval) // CUSTOM CHANGE: allow custom sendRate + sendInterval again
|
||||
{
|
||||
// send snapshot without timestamp.
|
||||
// receiver gets it from batch timestamp to save bandwidth.
|
||||
@ -426,8 +425,11 @@ void UpdateServerInterpolation()
|
||||
void UpdateServer()
|
||||
{
|
||||
// broadcasting
|
||||
if (syncDirection == SyncDirection.ServerToClient || IsClientWithAuthority)
|
||||
{
|
||||
UpdateServerBaseline();
|
||||
UpdateServerDelta();
|
||||
}
|
||||
|
||||
// interpolate remote clients
|
||||
UpdateServerInterpolation();
|
||||
|
Loading…
Reference in New Issue
Block a user