mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
fix mom orbs a bit
This commit is contained in:
parent
634c34fb15
commit
f6db56ebce
2 changed files with 30 additions and 0 deletions
21
quant.ew/data/entities/animals/boss_wizard/orb_rotation.lua
Normal file
21
quant.ew/data/entities/animals/boss_wizard/orb_rotation.lua
Normal file
|
@ -0,0 +1,21 @@
|
|||
dofile_once("data/scripts/lib/utilities.lua")
|
||||
|
||||
local entity_id = GetUpdatedEntityID()
|
||||
local boss_id = EntityGetRootEntity( entity_id )
|
||||
local x,y = EntityGetTransform( boss_id )
|
||||
|
||||
local comp = EntityGetFirstComponent( entity_id, "VariableStorageComponent", "wizard_orb_id" )
|
||||
if ( comp ~= nil ) then
|
||||
local id = ComponentGetValue2( comp, "value_int" )
|
||||
|
||||
local count = 8
|
||||
local circle = math.pi * 2
|
||||
local inc = circle / count
|
||||
|
||||
local dir = inc * id + CrossCall("ew_host_frame_num") * 0.01
|
||||
|
||||
local nx = x + math.cos( dir ) * 50
|
||||
local ny = y - math.sin( dir ) * 50 - 20
|
||||
|
||||
EntitySetTransform( entity_id, nx, ny )
|
||||
end
|
|
@ -24,8 +24,17 @@ ctx.init = function()
|
|||
ctx.is_inventory_open = false
|
||||
ctx.rpc_peer_id = nil
|
||||
ctx.is_wand_pickup = false
|
||||
ctx.host_frame_num = 0
|
||||
end
|
||||
|
||||
np.CrossCallAdd("ew_host_frame_num", function()
|
||||
if ctx.my_id == ctx.host_id then
|
||||
return GameGetFrameNum()
|
||||
else
|
||||
return ctx.host_frame_num
|
||||
end
|
||||
end)
|
||||
|
||||
local function is_measure_perf_enabled()
|
||||
-- return ctx.proxy_opt.debug
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue