add '/' to spectate self

This commit is contained in:
bgkillas 2024-11-16 15:55:09 -05:00
parent b0bc3d199b
commit d0b21de34c
3 changed files with 14 additions and 2 deletions

View file

@ -334,6 +334,9 @@ function spectate.on_world_update()
has_switched = true
re_cam = true
elseif InputIsKeyJustDown(tonumber(ModSettingGet("quant.ew.rebind_sspectate"))) then
camera_player_id, camera_player = get_me()
re_cam = true
end
set_camera_pos()
ctx.spectating_over_peer_id = camera_player_id
@ -346,7 +349,7 @@ function spectate.on_world_update()
if GameGetIsGamepadConnected() then
text = "Use d-pad-left and d-pad-right keys to spectate over other players."
else
text = "Use ',' and '.' keys to spectate over other players."
text = "Use ',' and '.' keys to spectate over other players. '/' for self"
end
local tw, th = GuiGetTextDimensions(gui, text)
GuiText(gui, w-2-tw, h-1-th, text)

View file

@ -126,6 +126,15 @@ local function build_settings()
is_waiting_for_input = false,
scope = MOD_SETTING_SCOPE_RUNTIME,
},
{
id = "rebind_sspectate",
ui_name = "spectate self Button",
ui_description = "self.",
value_default = "56",
ui_fn = ui_get_input,
is_waiting_for_input = false,
scope = MOD_SETTING_SCOPE_RUNTIME,
},
},
},
}