mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
minor optimization
This commit is contained in:
parent
6de1cd2278
commit
740e5638e5
3 changed files with 6 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue