no making ping while polied

This commit is contained in:
bgkillas 2024-10-20 20:03:17 -04:00
parent 62d6a3146a
commit a5419e559b

View file

@ -25,8 +25,6 @@ local function world2gui( x, y )
return x, y, vres_scaling_factor
end
local mid_is_held = false
function module.on_world_update()
GuiStartFrame(gui)
@ -42,8 +40,8 @@ function module.on_world_update()
local gui_id = 2
if InputIsMouseButtonJustDown(3) or InputIsJoystickButtonJustDown(0, 18) then
if not mid_is_held then
if (not EntityHasTag(ctx.my_player.entity, "polymorphed") or EntityHasTag(ctx.my_player.entity, "ew_notplayer"))
and (InputIsMouseButtonJustDown(3) or InputIsJoystickButtonJustDown(0, 18)) then
local x,y
if GameGetIsGamepadConnected() then
local tx, ty
@ -59,10 +57,6 @@ function module.on_world_update()
end
rpc.send_ping(x, y)
end
mid_is_held = true
else
mid_is_held = false
end
local i = 1
while i <= #pings do