diff --git a/docs/hooks.md b/docs/hooks.md index 0d42af77..aa2d9b7e 100644 --- a/docs/hooks.md +++ b/docs/hooks.md @@ -3,6 +3,7 @@ - `ctx.hook.on_world_initialized()` - called on OnWorldInitialized. - `ctx.hook.on_new_entity(ent)` - called on new alive entity. - `ctx.hook.on_world_update()` - called on OnWorldPreUpdate. + - `ctx.hook.on_world_update_post()` - called on OnWorldPostUpdate. - `ctx.hook.on_world_update_client()` - called on OnWorldPreUpdate, but only on clients. - `ctx.hook.on_world_update_host()` - called on OnWorldPreUpdate, but only on host. - `ctx.hook.on_new_player_seen(new_playerdata, player_count)` - called the first time player with this peer_id has entered the world. diff --git a/quant.ew/files/system/entity_sync_helper/entity_sync_helper.lua b/quant.ew/files/system/entity_sync_helper/entity_sync_helper.lua index a7288e0d..66b89a5e 100644 --- a/quant.ew/files/system/entity_sync_helper/entity_sync_helper.lua +++ b/quant.ew/files/system/entity_sync_helper/entity_sync_helper.lua @@ -79,13 +79,13 @@ end) local mod = {} -local function bool_to_truefalse(v) +--[[local function bool_to_truefalse(v) if v then return "true" else return "false" end -end +end]] function mod.on_world_update_post() local c_thrown = thrown diff --git a/quant.ew/files/system/telekenisis/telekenisis.lua b/quant.ew/files/system/telekenisis/telekenisis.lua index 2ee0815a..f11cfc10 100644 --- a/quant.ew/files/system/telekenisis/telekenisis.lua +++ b/quant.ew/files/system/telekenisis/telekenisis.lua @@ -105,6 +105,9 @@ function tele.on_world_update() ent_to_body[ent] = nil else ent_to_body[ent] = PhysicsBodyIDGetFromEntity(ent) + if ent_to_body[ent] ~= nil and #ent_to_body[ent] == 0 then + ent_to_body[ent] = nil + end end end end