Fix: avatars are capsules in the exe -- use load().instantiate(), not runtime GLTFDocument
checkpoint / checkpoint (push) Successful in 1m47s

Playtest log had the smoking gun:
  WARNING: player.gd: no avatar to show; keeping the placeholder capsule
  ERROR: Parameter "data.tree" is null. at: get_tree

avatar_loader.gd read raw .glb bytes and ran GLTFDocument.append_from_buffer
+ generate_scene() at runtime. In a release export that path produced NO
Skeleton3D (works fine in the editor / headless-from-source), so
load_base_body() returned null and the player fell back to the capsule.
The queue_free() calls in that path also errored (loader runs detached from
any tree).

Fix: load(path).instantiate() the Godot-imported PackedScene (the .scn that
actually ships in the pack, with the skeleton + skin set up by the import
pipeline). The raw-bytes GLTFDocument path stays available for future
user-uploaded models but isn't used for the bundled catalog.

- run_checkpoint_tests.py: also runs the avatar smoke against the EXPORTED
  pack, not just source -- that's what catches release-only resource
  differences. Verified: 14/14 against export/game.pck.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jtxAiu5dAW4WxCNdGkrkJ
This commit is contained in:
2026-09-06 00:58:49 +00:00
parent 44bfcb1871
commit 6ad91b895c
2 changed files with 50 additions and 57 deletions
+17
View File
@@ -191,6 +191,23 @@ def main():
r = run([godot_bin, "--headless", "--path", str(ROOT),
"--script", "res://scripts/verify_export_contents.gd"], env=godot_env)
results["export packaging"] = r.returncode == 0
# Run a key smoke against the EXPORTED pack, not just source --
# release-build resources differ (e.g. the runtime GLTFDocument
# path produced no skeleton in a real export; load().instantiate()
# of the imported .scn does). This runs the avatar smoke on
# exactly what ships.
exported_pck = ROOT / "export" / "_ci_check.pck"
exported_pck.parent.mkdir(exist_ok=True)
ep = run([godot_bin, "--headless", "--path", str(ROOT),
"--export-pack", "Linux", str(exported_pck)], env=godot_env)
if ep.returncode == 0 and exported_pck.exists():
r = run([godot_bin, "--headless", "--main-pack", str(exported_pck),
"--script", "res://scripts/smoke_test_avatar_system.gd"], env=godot_env)
results["avatar smoke (exported pack)"] = r.returncode == 0
exported_pck.unlink(missing_ok=True)
else:
results["avatar smoke (exported pack)"] = False
finally:
server_proc.terminate()
try: