Repository navigation
CI validation: em034 Lady canonical runtime - #111
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 474de7e9f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!part.placement.resolved) return false; | ||
| part.placement.mode = CompositePlacementMode::HostJoint; | ||
| binding.control_domain = domain; |
There was a problem hiding this comment.
Preserve the component root before enabling independent playback
When a slot-20 raw MOT or component MotionScript switches to IndependentMotionScript, this only changes the placement mode; it never captures the currently resolved attachment transform in placement.root_matrix. bind_part() subsequently treats the part as placed using that still-default identity matrix, so every independent component animation is skinned at the archive origin instead of its stowed/deployed position on Lady. Populate the standalone root transform before changing modes.
Useful? React with 👍 / 👎.
| if (archive_name.find("em034") != std::string_view::npos && | ||
| position != nullptr) { |
There was a problem hiding this comment.
Normalize the archive name before identifying Lady
For an archive named with different casing, such as EM034.PAC, archive_variants() still recognizes the file case-insensitively and assembles a Lady appearance, but this case-sensitive search skips all latent Shl visuals. The same search later leaves slots 12/13 with generic script roles, and is_em034() similarly disables the class-specific playback route, so a valid renamed archive loses or misroutes most of the new runtime behavior. Reuse the normalized basename used by variant detection.
Useful? React with 👍 / 👎.
| if (!session->lady_component_bindings.empty()) { | ||
| reset_lady_runtime(session); | ||
| (void)apply_part_attachments(session); | ||
| } |
There was a problem hiding this comment.
Reset Lady control state after failed motion binding
If a malformed or incompatible slot-20 MOT is selected, the load path first moves component 0 into the independent control domain and then fails before assigning session->motion. A subsequent clear_motion() returns immediately because the motion is null, making this newly added Lady reset block unreachable; the component therefore remains detached from its body constraint for later playback. Reset the Lady runtime even when there is no bound MotionState, or roll back the domain transition on load failure.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbe8550e24
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| report = load_motion( | ||
| session, payload.name, payload.bytes.data(), payload.bytes.size()); |
There was a problem hiding this comment.
Keep raw playback from applying MotionScript weapon states
When a player PAC has both motion_script and weapon_bindings, this call still enters load_motion(), which populates state->weapon_keys from the session's script and later changes weapon attachments in apply_motion_frame(). Consequently, tapping the newly labeled raw-MOT button continues to execute MotionScript state events, contrary to the raw/script separation; use a load path or flag that suppresses script-derived keys for raw library playback.
Useful? React with 👍 / 👎.
| spawn_lady_dynamic_visual( | ||
| session, applied.dynamic_actor, | ||
| std::max(signal.after_frame, 0.0F)); |
There was a problem hiding this comment.
Reconstruct dynamic spawns at the signal frame
When playback seeks or the long-press scrub jumps directly past a Shl spawn signal, apply_motion_frame() has already posed Lady at the requested destination frame before this helper samples component-0 node worlds. Although the historical signal frame is passed as event_frame, the actor is therefore spawned from the future body pose and then advanced over the entire elapsed interval, producing an incorrect origin and trajectory. Replay needs to capture the component transform at the signal frame or process the intervening poses chronologically.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e475674ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| state.script_bank = selection->bank; | ||
| state.script_action = selection->action; |
There was a problem hiding this comment.
Honor MotionScript resource loop modes
When the selected table-B resource has loop == 0 (play once) or loop == 2 (defer to the actor), this state retains only its bank/action and still exposes the MOT's ordinary loop start. DmcRenderView.currentMotionFrame() consequently wraps every such Script Play at the MOT loop point, causing one-shot actions—and Lady entry signals or spawns—to execute repeatedly instead of stopping or following the actor policy. Carry the selected MotionResource::loop mode into playback and use it when reporting/advancing the timeline.
Useful? React with 👍 / 👎.
|
|
||
| auto& mesh = out->presentation_mesh; | ||
| mesh = session.render_mesh; | ||
| out->presentation_textures = session.attached_textures; |
There was a problem hiding this comment.
Reuse textures for dynamic Lady presentation
While a dynamic visual is active—especially Shl03, which remains active until the motion is cleared—every rendered frame deep-copies all attached textures here and then copies each visual's textures below. ImagePreview owns its RGBA byte vector, so normal 60-fps playback repeatedly allocates and copies potentially many megabytes before rasterization, which can make the new animation path stutter or exhaust memory bandwidth on mobile devices. Cache the combined texture array or make the presentation reference immutable session textures instead.
Useful? React with 👍 / 👎.
Temporary exact-head validation PR for the em034 Lady canonical runtime reconstruction. This PR exists only to trigger the ready_for_review CI gate at the same head as draft PR #104. Do not merge.