mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
no making ping while polied
This commit is contained in:
parent
62d6a3146a
commit
a5419e559b
1 changed files with 13 additions and 19 deletions
|
@ -25,8 +25,6 @@ local function world2gui( x, y )
|
||||||
return x, y, vres_scaling_factor
|
return x, y, vres_scaling_factor
|
||||||
end
|
end
|
||||||
|
|
||||||
local mid_is_held = false
|
|
||||||
|
|
||||||
function module.on_world_update()
|
function module.on_world_update()
|
||||||
GuiStartFrame(gui)
|
GuiStartFrame(gui)
|
||||||
|
|
||||||
|
@ -42,26 +40,22 @@ function module.on_world_update()
|
||||||
|
|
||||||
local gui_id = 2
|
local gui_id = 2
|
||||||
|
|
||||||
if InputIsMouseButtonJustDown(3) or InputIsJoystickButtonJustDown(0, 18) then
|
if (not EntityHasTag(ctx.my_player.entity, "polymorphed") or EntityHasTag(ctx.my_player.entity, "ew_notplayer"))
|
||||||
if not mid_is_held then
|
and (InputIsMouseButtonJustDown(3) or InputIsJoystickButtonJustDown(0, 18)) then
|
||||||
local x,y
|
local x,y
|
||||||
if GameGetIsGamepadConnected() then
|
if GameGetIsGamepadConnected() then
|
||||||
local tx, ty
|
local tx, ty
|
||||||
if ctx.spectating_over_peer_id == nil or ctx.spectating_over_peer_id == ctx.my_id then
|
if ctx.spectating_over_peer_id == nil or ctx.spectating_over_peer_id == ctx.my_id then
|
||||||
tx, ty = EntityGetTransform(ctx.my_player.entity)
|
tx, ty = EntityGetTransform(ctx.my_player.entity)
|
||||||
else
|
|
||||||
tx, ty = EntityGetTransform(ctx.players[ctx.spectating_over_peer_id].entity)
|
|
||||||
end
|
|
||||||
x, y = InputGetJoystickAnalogStick(0, 1)
|
|
||||||
x, y = x * 60 + tx, y * 60 + ty
|
|
||||||
else
|
else
|
||||||
x,y = DEBUG_GetMouseWorld()
|
tx, ty = EntityGetTransform(ctx.players[ctx.spectating_over_peer_id].entity)
|
||||||
end
|
end
|
||||||
rpc.send_ping(x, y)
|
x, y = InputGetJoystickAnalogStick(0, 1)
|
||||||
|
x, y = x * 60 + tx, y * 60 + ty
|
||||||
|
else
|
||||||
|
x,y = DEBUG_GetMouseWorld()
|
||||||
end
|
end
|
||||||
mid_is_held = true
|
rpc.send_ping(x, y)
|
||||||
else
|
|
||||||
mid_is_held = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local i = 1
|
local i = 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue