feat: prepare for alpha release

This commit is contained in:
littensy 2025-10-02 01:43:28 -07:00
parent 5a05f01223
commit f5709c3112
10 changed files with 251 additions and 54 deletions

View file

@ -287,20 +287,27 @@ local function startSync(onSync: (client: any, payloads: { SyncPayload }) -> ())
onSyncCallback = onSync
if game then
local elapsedTime = 0
connection = game:GetService("RunService").Heartbeat:Connect(function(deltaTime)
elapsedTime += deltaTime
if elapsedTime >= config.interval then
elapsedTime %= config.interval
debug.profilebegin("CharmSync")
flush()
debug.profileend()
end
end)
if not game then
return stopSync
end
local timer = 0
connection = game:GetService("RunService").Heartbeat:Connect(function(deltaTime)
if config.interval < 0 then
return
end
timer += deltaTime
if timer >= config.interval then
timer %= config.interval
debug.profilebegin("CharmSync")
flush()
debug.profileend()
end
end)
return stopSync
end