diff options
author | David Fioramonti | 2017-08-30 19:03:52 -0700 |
---|---|---|
committer | David Fioramonti | 2017-08-31 04:10:07 -0700 |
commit | 4dbfc3595e459a8c51dcdbfada812e525218758f (patch) | |
tree | 588d905f1d8ef6aa1e07c6dc716df8b0a2409daa | |
parent | 4c2ac405a549b85eb15dfd8e32f176af4f8321e8 (diff) | |
download | scummvm-rg350-4dbfc3595e459a8c51dcdbfada812e525218758f.tar.gz scummvm-rg350-4dbfc3595e459a8c51dcdbfada812e525218758f.tar.bz2 scummvm-rg350-4dbfc3595e459a8c51dcdbfada812e525218758f.zip |
TITANIC: Fix star lock2/lock3 overshoot, fixes #9961
The problem was that the camera when locking onto the 2nd star
was starting at a bad spot and then overshooting when it moved
to do the locking movements.
A solution I picked is just to start at the final spot.
I also removed the check that the distance the mover had to move
was too large since the bug is now avoided.
-rw-r--r-- | engines/titanic/star_control/star_camera.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp index db087129ae..d1e233906b 100644 --- a/engines/titanic/star_control/star_camera.cpp +++ b/engines/titanic/star_control/star_camera.cpp @@ -586,22 +586,17 @@ bool CStarCamera::lockMarker2(CViewport *viewport, const FVector &secondStarPosi assert(unusedScale); } - //newOr.set(m4._col3, m4._col2, m4._col4); newOr.set(m4._col3, m4._col2, m4._col4); FVector newPos = m4._col1; FMatrix oldOr = _viewport.getOrientation(); - - if (minDistance > 1.0e8) { - // The transition will do poorly in this case. - _mover->transitionBetweenPosOrients(oldPos, newPos, oldOr, newOr); - return false; - } - else { - _mover->transitionBetweenPosOrients(oldPos, newPos, oldOr, newOr); - CStarVector *sv = new CStarVector(this, secondStarPosition); - _mover->setVector(sv); - } + + // WORKAROUND: set old position to new position (1st argument), this prevents + // locking issues when locking the 2nd star. Fixes #9961. + _mover->transitionBetweenPosOrients(newPos, newPos, oldOr, newOr); + CStarVector *sv = new CStarVector(this, secondStarPosition); + _mover->setVector(sv); + return true; } |