Fix two issues with pivot points (#382)

- ResetPivotPoint() now truely resets the pivot point (and not only
invalidating it).
- The copy constructor of lcPiece now also copies the state of the pivot
point. Thus, duplicating pieces also duplicates the pivot points.
This commit is contained in:
Gerd Wachsmuth 2019-08-20 23:52:29 +02:00 committed by Leonardo Zide
parent 5b857ccf65
commit 516ddcbf7e
2 changed files with 3 additions and 0 deletions

View file

@ -44,7 +44,9 @@ lcPiece::lcPiece(const lcPiece& Other)
mStepHide = Other.mStepHide;
mGroup = Other.mGroup;
mFileLine = -1;
mPivotMatrix = Other.mPivotMatrix;
mState |= ( Other.mState & LC_PIECE_PIVOT_POINT_VALID );
mPositionKeys = Other.mPositionKeys;
mRotationKeys = Other.mRotationKeys;

View file

@ -535,6 +535,7 @@ public:
void ResetPivotPoint()
{
mState &= ~LC_PIECE_PIVOT_POINT_VALID;
mPivotMatrix = lcMatrix44Identity();
}
public: