Skip to content

Fixed CPM Item render issue#70

Open
Sarocesch wants to merge 6 commits intoDynamXInc:betafrom
Sarocesch:beta
Open

Fixed CPM Item render issue#70
Sarocesch wants to merge 6 commits intoDynamXInc:betafrom
Sarocesch:beta

Conversation

@Sarocesch
Copy link
Copy Markdown

@Sarocesch Sarocesch commented Feb 17, 2026

Render bug between DynamX and Custom Player Models - fixed

Items moved strangely in inventory

Fix evaluateSpline bounds checking and interpolation edge cases and Improve error handling in physics simulation loop

int index = powerGraph.getControlPoints().size() - 1;
int size = powerGraph.getControlPoints().size();
if (size < 2) {
return size == 1 ? powerGraph.getControlPoints().get(0).y : 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get why this is necessary. The clamp you added after isn't sufficient?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added it to prevent an IndexOutOfBoundsException. If the graph is empty or only has 1 point, the size - 2 logic in the clamp below results in a negative index and crashes the game. I think this just bails out safely before any of that happens.

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