Fix rejoin opponent GUID + CDN skybox null/logging

- GameReadyResponse: add OpponentDisplayName? (populated only on AlreadyStarted)
- GameReadyHandler: inject SorIdentityDbContext; fetch opponent display name when
  session is already Active so rejoining clients get the name immediately
- Game.gd: on AlreadyStarted ack, read opponentDisplayName and set Game.opponent_name
  before calling _fetch_state() — fixes opponent showing as GUID on rejoin
- game_screen.gd: replace typed-Dictionary null assignment with safe Variant check
  to avoid silent GDScript coercion when no skybox is configured; strip query-string
  from URL before extension check (_fetch_skybox); add print logging throughout CDN
  skybox flow to surface download/decode failures

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
dingo
2026-03-25 15:03:35 -04:00
co-authored by Claude Happy
parent 85e9b63579
commit 453f008620
4 changed files with 38 additions and 10 deletions
+4
View File
@@ -177,6 +177,10 @@ func send_ready() -> void:
print("[Game] <<< game.ready.ack ", JSON.stringify(p))
var d := p as Dictionary
if d.get("status", "") == "AlreadyStarted":
# Restore opponent name on rejoin — the server includes it in the ack.
var oname: String = str(d.get("opponentDisplayName", ""))
if not oname.is_empty():
opponent_name = oname
_fetch_state(),
func(code: String, msg: String) -> void:
print("[Game] ERR game.ready code=", code, " msg=", msg))