Client fixors

This commit is contained in:
dingo
2026-03-07 10:28:32 -05:00
parent 84612614c5
commit e7da2532a2
6 changed files with 209 additions and 9 deletions
@@ -0,0 +1 @@
uid://dl5bp6s1hdsuo
+1 -1
View File
@@ -16,7 +16,7 @@ extends Node
const SERVER_URL := "wss://hub.aeternalisgames.com/ws"
## Print every sent/received packet as JSON to stdout.
@export var debug_log_packets: bool = true
@export var debug_log_packets: bool = false
const KEEPALIVE_INTERVAL_SEC := 30.0 ## Idle seconds before sending an app-level ping.
const KEEPALIVE_TIMEOUT_SEC := 30.0 ## Seconds with no reply before forcing a reconnect.
@@ -187,10 +187,13 @@ func _setup_environment() -> void:
# ── Camera ────────────────────────────────────────────────────────────────────
func _apply_camera() -> void:
_camera_rig.position = _cam_pivot
var pitch_rad := deg_to_rad(_cam_pitch)
_camera_rig.position = _cam_pivot
_camera_rig.rotation_degrees = Vector3(0.0, _cam_yaw, 0.0)
_camera.position = Vector3(0.0, 0.0, _cam_distance)
_camera.rotation_degrees = Vector3(-_cam_pitch, 0.0, 0.0)
_camera.position = Vector3(0.0,
_cam_distance * sin(pitch_rad),
_cam_distance * cos(pitch_rad))
_camera.rotation_degrees = Vector3(-_cam_pitch, 0.0, 0.0)
func _zoom(delta: float) -> void:
@@ -1149,11 +1152,16 @@ func _update_hud(state: Dictionary) -> void:
if phase == "Placement":
var my_arch : Dictionary = my.get("archSpirit", {})
if my_arch.is_empty() or my_arch.get("position") == null:
_phase_lbl.text = "Phase: Placement — click a tile to place your ArchSpirit"
if _mode != Mode.PLACEMENT:
_set_mode(Mode.PLACEMENT)
_clear_highlights()
_highlight_tiles(_valid_placement_tiles(), HI_GREEN)
if is_mine:
_phase_lbl.text = "Phase: Placement — click a tile to place your ArchSpirit"
if _mode != Mode.PLACEMENT:
_set_mode(Mode.PLACEMENT)
_clear_highlights()
_highlight_tiles(_valid_placement_tiles(), HI_GREEN)
else:
_phase_lbl.text = "Phase: Placement — waiting for opponent…"
if _mode == Mode.PLACEMENT:
_set_mode(Mode.NONE)
# ── Discard viewer ────────────────────────────────────────────────────────────
@@ -0,0 +1 @@
uid://b8x84lb58h6gx
@@ -0,0 +1 @@
uid://80xn88dg4840