Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update position of attached motes based on real position #473

Merged
merged 1 commit into from
Jul 14, 2024

Conversation

SokyranTheDragon
Copy link
Member

This should fix the issue with Noctol eyes, along with other attached motes being drawn away from the pawns they are attached to. This was likely never really noticed before due to no other vanilla attached motes having their position as important as here.

Getting a DrawPos of a pawn during ticking will cause PawnTweener.TweenedPos to return TweenedPosRoot in MP to make the method deterministic. However, MoteAttached updated during simulation will draw it in an incorrect position due to the pawn position not being where it is visually.

The fix here is to cause PawnTweener.TweenedPos patch not to run while calculating the position of the attached mote.

Potential alternative approach would be to make a method that works like Pawn_DrawTracker.DrawPos, but using PawnTweener.tweenedPos field directly rather than PawnTweener.TweenedPos getter.

Another potential approach would be to make a reverse patch on PawnTweener.TweenedPos, but (again) replace the call to the getter with a direct field access in the transpiler.

There's possibly other ways to handle this situation, but those 3 are the only ones I could think of.

This should fix the issue with Noctol eyes, along with other attached motes being drawn away from the pawns they are attached to. This was likely never really noticed before due to no other vanilla attached motes having their position as important as here.

Getting a DrawPos of a pawn during ticking will cause `PawnTweener.TweenedPos` to return `TweenedPosRoot` in MP to make the method deterministic. However, `MoteAttached` updated during simulation will draw it in an incorrect position due to the pawn position not being where it is visually.

The fix here is to cause `PawnTweener.TweenedPos` patch not to run while calculating the position of the attached mote.

Potential alternative approach would be to make a method that works like `Pawn_DrawTracker.DrawPos`, but using `PawnTweener.tweenedPos` field directly rather than `PawnTweener.TweenedPos` getter.

Another potential approach would be to make a reverse patch on `PawnTweener.TweenedPos`, but (again) replace the call to the getter with a direct field access in the transpiler.

There's possibly other ways to handle this situation, but those 3 are the only ones I could think of.
@SokyranTheDragon SokyranTheDragon added fix Fixes for a bug or desync. 1.5 Fixes or bugs relating to 1.5 (Not Anomaly). labels Jun 11, 2024
@Zetrith Zetrith merged commit 8011e49 into rwmt:master Jul 14, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.5 Fixes or bugs relating to 1.5 (Not Anomaly). fix Fixes for a bug or desync.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants