fix(client): free camera review fixes — action toggle, zoom reset, discrete guard, tests (#898)

- Replace raw KEY_F4 check with Input.is_action_just_pressed("free_camera") to
  consume the registered project action (matches F3/F12 dev toggle pattern)
- Reset camera.zoom to Vector2.ONE when toggling free camera off so zoom does
  not bleed into normal gameplay
- Add free_camera_mode guard to InputMapper._unhandled_input() so discrete
  actions (INTERACT, stance, pause) are suppressed alongside movement
- Add client/tests/test_free_camera.gd: flag default, movement suppression,
  discrete action suppression, zoom constant contracts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-02 18:03:06 +02:00
co-authored by Claude Opus 4.6
parent 3f5b4258ba
commit e002f811f0
3 changed files with 94 additions and 2 deletions
+2
View File
@@ -117,6 +117,8 @@ func _process(_delta: float) -> void:
# Discrete actions: fire once on key press (not held).
func _unhandled_input(event: InputEvent) -> void:
if GameState.dialogue_active or GameState.free_camera_mode:
return
var action: Action = -1
if event.is_action_pressed("interact"):