Skip to content

Commit

Permalink
Added force sync mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ov-anisa committed Jun 12, 2022
1 parent c1c9f6e commit 82e8c01
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions [Library]/assetify_library/utilities/syncer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ else
thread:create(function(cThread)
for i, j in imports.pairs(syncer.loadedClients) do
syncer:syncGlobalData(data, value, isForceSync, i)
thread:pause()
if not isForceSync then thread:pause() end
end
end):resume({
executions = downloadSettings.syncRate,
frames = 1
executions = (not isForceSync and downloadSettings.syncRate) or 1,
frames = (not isForceSync and 1) or 0
})
else
network:emit("Assetify:onRecieveSyncedGlobalData", true, false, targetPlayer, data, value)
Expand All @@ -334,11 +334,11 @@ else
thread:create(function(cThread)
for i, j in imports.pairs(syncer.loadedClients) do
syncer:syncEntityData(element, data, value, isForceSync, i)
thread:pause()
if not isForceSync then thread:pause() end
end
end):resume({
executions = downloadSettings.syncRate,
frames = 1
executions = (not isForceSync and downloadSettings.syncRate) or 1,
frames = (not isForceSync and 1) or 0
})
else
network:emit("Assetify:onRecieveSyncedEntityData", true, false, targetPlayer, element, data, value)
Expand Down

0 comments on commit 82e8c01

Please sign in to comment.