update on_physics_update & update standard components

This commit is contained in:
MihailRis
2025-09-13 23:24:57 +03:00
parent 2d29b8c46c
commit bf682daffe
9 changed files with 12 additions and 29 deletions
+2 -6
View File
@@ -133,21 +133,17 @@ return {
::continue::
end
end,
physics_update = function(tps, parts, part)
physics_update = function(delta)
for uid, entity in pairs(entities) do
if uid % parts ~= part then
goto continue
end
for _, component in pairs(entity.components) do
local callback = component.on_physics_update
if not component.__disabled and callback then
local result, err = pcall(callback, tps)
local result, err = pcall(callback, delta)
if err then
debug.error(err)
end
end
end
::continue::
end
end,
render = function(delta)