My previous PR was incorrect in that overriding DrawPos would be enough to achieve custom drawing position (without using PawnFlyerWorker), as vanilla code uses its private fields for it.
This PR allows for implementing custom drawing position due to:
Exposing private fields
EffectivePos is used for the flying pawn's position, as well as the carried thing's position
GroundPos and EffectiveHeight are used for shadow drawing
Adding a virtual method CustomRecomputePosition
When returning false, the vanilla code will calculate position (using PawnFlyerWorker)
When returning true, the vanilla code won't run and instead the positions need to be set in this method
My previous PR was incorrect in that overriding
DrawPos
would be enough to achieve custom drawing position (without usingPawnFlyerWorker
), as vanilla code uses its private fields for it.This PR allows for implementing custom drawing position due to:
EffectivePos
is used for the flying pawn's position, as well as the carried thing's positionGroundPos
andEffectiveHeight
are used for shadow drawingCustomRecomputePosition
false
, the vanilla code will calculate position (usingPawnFlyerWorker
)true
, the vanilla code won't run and instead the positions need to be set in this method