Make pmRefresh run PartsManager in same tick
This commit is contained in:
parent
111384703e
commit
f178094762
@ -295,8 +295,9 @@ function syncState()
|
|||||||
ping.syncState(setLocalState())
|
ping.syncState(setLocalState())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
pm_refresh=false
|
||||||
function pmRefresh()
|
function pmRefresh()
|
||||||
rateLimit(1, PartsManager.refreshAll, "refreshAll")
|
pm_refresh=true
|
||||||
end
|
end
|
||||||
|
|
||||||
function ping.syncState(tbl)
|
function ping.syncState(tbl)
|
||||||
@ -1126,6 +1127,11 @@ function tick()
|
|||||||
|
|
||||||
animateTick()
|
animateTick()
|
||||||
|
|
||||||
|
-- Check for queued PartsManager refresh
|
||||||
|
if pm_refresh then
|
||||||
|
PartsManager.refreshAll()
|
||||||
|
pm_refresh=false
|
||||||
|
end
|
||||||
-- End of tick --
|
-- End of tick --
|
||||||
old_state.health=player.getHealth()
|
old_state.health=player.getHealth()
|
||||||
old_state.color_check=color_check
|
old_state.color_check=color_check
|
||||||
|
Loading…
x
Reference in New Issue
Block a user