Update position of attached motes based on real position #473
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 returnTweenedPosRoot
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 usingPawnTweener.tweenedPos
field directly rather thanPawnTweener.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.