Fix Create elevator clipping on Sable sublevels - #1446
VictorioMo wants to merge 1 commit into
Conversation
|
|
|
I ran into this same bug and fixed it independently before finding this PR, so here's my data point. I used a single redirect on toGlobalVector in savePlayerFromClipping, converting the hit back to world space via logicalPose().transformPosition. That resolved it on Create 6.0.10, Simulated 1.3.2, Sable 2.0.5. Same approach as your sable$toActualGlobalVector. I haven't run your version, so I can't speak to the other two redirects. Two questions in case it's useful: Was the getY() redirect needed in your testing? From tracing it, the plot offset appeared to cancel out already, since the callers subtract the same value that savePlayerFromClipping adds back. And for rayTraceContraption, I left that path alone because ContraptionHandlerClientMixin seemed to already handle the conversion. Possible there's a case where it doesn't that I didn't hit. |
This PR fixes Create elevator player clipping/teleportation on Sable sublevels.
The issue appears to come from ContraptionCollider.savePlayerFromClipping() mixing global player coordinates with sublevel/contraption coordinates. This could cause the player's Y position to be set roughly 100–200 blocks above the elevator.
The fix converts the relevant contraption Y and anti-clipping raytrace coordinates between Sable sublevel space and global space.
Fixes #1304
Related to #673 and #1297
Test video: https://youtu.be/cQeV1smUpY0
I tested the fix after reloading the world and after assembling a new elevator, and could no longer reproduce the teleport. Other scenarios have not yet been tested.