Skip to content

Fix stale initial angle propagation in terminal bending muscles#683

Merged
chrxh merged 3 commits into
developfrom
copilot/fix-creature-tests
May 21, 2026
Merged

Fix stale initial angle propagation in terminal bending muscles#683
chrxh merged 3 commits into
developfrom
copilot/fix-creature-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

  • Inspect current muscle angle fix and failing test
  • Investigate timing difference between AutoTriggerInterval 20 and 100
  • Identify a smaller engine-side fix
  • Replace broad muscle-processing fix with minimal constructor-side guard
  • Format modified files
  • Run targeted/order-dependent validation
  • Run full core validation

Copilot AI and others added 2 commits May 21, 2026 18:06
Agent-Logs-Url: https://github.com/chrxh/alien/sessions/6e6d37d9-f956-4406-88d1-9ca6f788958b

Co-authored-by: chrxh <73127001+chrxh@users.noreply.github.com>
Agent-Logs-Url: https://github.com/chrxh/alien/sessions/6e6d37d9-f956-4406-88d1-9ca6f788958b

Co-authored-by: chrxh <73127001+chrxh@users.noreply.github.com>
Agent-Logs-Url: https://github.com/chrxh/alien/sessions/3d528d72-6e8b-4746-83f3-b5d5810067a4

Co-authored-by: chrxh <73127001+chrxh@users.noreply.github.com>
Copilot finished work on behalf of chrxh May 21, 2026 17:02
Copilot AI requested a review from chrxh May 21, 2026 17:02
@chrxh
Copy link
Copy Markdown
Owner

chrxh commented May 21, 2026

@copilot explain your fix

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 21, 2026

@copilot explain your fix

The fix in e704fd5 narrows the previous broad muscle-side workaround to the actual construction case. continueConstructionOnBranch was restoring a bending host muscle’s initialAngle via lastObject even when lastObject was not the host muscle’s pivot connection, which could rewrite the wrong angle and produce the 120/240 geometry. Now it still resets the host muscle front angle, but only calls restoreInitialAngleFromPrevious(hostObject, lastObject, ...) when hostObject->connections[0].object == lastObject, i.e. when lastObject is the real pivot. The AutoTriggerInterval=20 case worked because construction advanced before the stale restore affected the final geometry; interval 100 aligned with head/front-angle updates and exposed it.

Copilot finished work on behalf of chrxh May 21, 2026 17:19
@chrxh chrxh marked this pull request as ready for review May 21, 2026 18:58
@chrxh chrxh merged commit bd283b2 into develop May 21, 2026
3 checks passed
@chrxh chrxh deleted the copilot/fix-creature-tests branch May 21, 2026 18:58
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.

2 participants