Add input debug to window title for diagnostic

Shows Input.get_axis() values, weapon slot states, and fire
state in the window title bar — visible even when print()
output is lost on Windows GUI exports.
This commit is contained in:
2026-07-03 23:13:42 -04:00
parent c5b6b05801
commit 695e4db5cd
@@ -129,6 +129,12 @@ func _process(_delta: float):
print("[PLAYER DEBUG] _process skipping — input not authority (unique_id=%d, input_auth=%d)" % [multiplayer.get_unique_id(), input.get_multiplayer_authority()])
return
# DEBUG: Show input state in window title
if _is_local and input:
var mx := Input.get_axis("move_west", "move_east")
var mz := Input.get_axis("move_north", "move_south")
get_window().title = "TS [mv=%.1f,%.1f] [sl=%s%s%s%s] [fire=%s]" % [mx, mz, input.slot_1, input.slot_2, input.slot_3, input.slot_4, input.fire_held]
# Smooth position interpolation between ticks
var f := NetworkTime.tick_factor
global_position = _lerp_from_pos.lerp(_lerp_to_pos, f)