Skip to content

Clients draw a room entity's model; the tactical boat's model is its default look - #1343

Merged
transfix merged 1 commit into
feat/relay-worldfrom
feat/relay-entity-models
Nov 18, 2026
Merged

transfix merged 1 commit into
feat/relay-worldfrom
feat/relay-entity-models

Conversation

@transfix

Copy link
Copy Markdown
Owner

Stacked on #1337. Clients watching a server world now draw each vehicle's model, not just its box, and the new tactical boat model is wired in.

Change

  • Model looks on clients. A room entity's model look arrives as the file's name (Humvee.glb, TacticalBoat.glb). The client draws it from its own copy, found by find_vehicle_model in its cvcpkg packages, fitted to the chassis and set on the ground beneath it. A model the client hasn't installed, or one that doesn't read, is drawn as the box.
  • vehicle_view exposes make_vehicle_model_cache() and attach_vehicle_model(): the fitted-model path it already uses, now available to other views. The lsystem_coast session's boat-node PR adds the same two, byte for byte, so whichever lands second merges cleanly.
  • room_entity.base_z is the ground under the chassis's centre, relative to it. That's where a fitted model's base goes.
  • find_vehicle_model treats a name without an extension as its .glb (TacticalBoat finds TacticalBoat.glb). That's how the new vehicle-tactical-boat package (cy-pca/graphics-assets#19) installs it, beside Humvee.glb.
  • resolve_vehicle_looks: a boat on the tactical preset defaults to the TacticalBoat model, fitted, the way a humvee defaults to Humvee.glb. The lsystem_coast session's PR adds that preset; until then the default is inert.

Tests

  • AriadneWorldVehicles.LooksAreFoundWhereTheyAre finds TacticalBoat by its name and by its file's name, and checks the tactical preset's default look.
  • cvcgl_room_view: a model look the client hasn't installed is drawn as its box.
  • The server document, room entity and room view tests still pass on Windows Release. Changed lines are clang-format clean.

Coordination

The lsystem_coast session owns fitted()'s axis logic: glTF's Y-up, and finding the bow as the narrow end. Without that change, the tactical boat model lies on its side. This PR doesn't touch fitted().

…its default look

Clients watching a server world drew every entity as its box look. Now a
room entity's model look (a file's name: Humvee.glb, TacticalBoat.glb)
is drawn from the client's own copy, which find_vehicle_model finds in
its cvcpkg packages, fitted to the chassis and set on the ground under
it; one it has not installed is drawn as its box.

- vehicle_view: make_vehicle_model_cache() and attach_vehicle_model(),
  the fitted-model path vehicle_view already uses, for other views (the
  lsystem_coast session's boat node adds the same two, byte for byte).
- room_entity.base_z: the ground under the chassis's centre, relative to
  it, where a fitted model's base goes.
- room_view: each entity's model look resolved locally, the box when it
  is not there or does not read; its own model cache.
- find_vehicle_model: a name without an extension is its .glb
  (TacticalBoat: TacticalBoat.glb, as the vehicle-tactical-boat package
  installs it beside Humvee.glb).
- resolve_vehicle_looks: a boat on the "tactical" preset (which the
  lsystem_coast session's PR adds) defaults to the TacticalBoat model,
  fitted, as a humvee defaults to Humvee.glb.

Tests: LooksAreFoundWhereTheyAre (TacticalBoat by its name and its
file's, the tactical preset's default look); cvcgl_room_view (a model
look the host has not installed is drawn as its box).
Base automatically changed from feat/relay-entity-view to feat/relay-entities November 18, 2026 03:53
Base automatically changed from feat/relay-entities to feat/relay-world November 18, 2026 03:53
@transfix
transfix merged commit 2ab3263 into feat/relay-world Nov 18, 2026
8 checks passed
@transfix
transfix deleted the feat/relay-entity-models branch November 18, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant