aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Fioramonti2017-09-02 07:41:24 -0700
committerDavid Fioramonti2017-09-02 07:41:26 -0700
commit4e586ba43d9eeff96555be38c89f60209e7ddb0a (patch)
tree10de8f77dc676ec035c2344582713aa230424f6e
parent0d5d031564222a643555215ee1257cc6ba3f3c62 (diff)
downloadscummvm-rg350-4e586ba43d9eeff96555be38c89f60209e7ddb0a.tar.gz
scummvm-rg350-4e586ba43d9eeff96555be38c89f60209e7ddb0a.tar.bz2
scummvm-rg350-4e586ba43d9eeff96555be38c89f60209e7ddb0a.zip
TITANIC: Fix star3 locking overshoot, #9961
I fixed this previously for star2, I thought the overshoot for star3 locking might have also been fixed since I hadn't observed it in a while. I applied the same workaround by setting the old position to be the new position.
-rw-r--r--engines/titanic/star_control/star_camera.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp
index a99d70276f..ce083dee78 100644
--- a/engines/titanic/star_control/star_camera.cpp
+++ b/engines/titanic/star_control/star_camera.cpp
@@ -26,7 +26,6 @@
#include "titanic/star_control/fmatrix.h"
#include "titanic/star_control/fpoint.h"
#include "titanic/star_control/marked_camera_mover.h"
-//#include "titanic/star_control/matrix_inv.h"
#include "titanic/star_control/unmarked_camera_mover.h"
#include "titanic/star_control/error_code.h"
#include "titanic/support/simple_file.h"
@@ -616,7 +615,9 @@ bool CStarCamera::lockMarker3(CViewport *viewport, const FVector &thirdStarPosit
FVector newPos = viewport->_position;
FVector oldPos = _viewport._position;
- _mover->transitionBetweenPosOrients(oldPos, newPos, oldOr, newOr);
+ // WORKAROUND: set old position to new position (1st argument), this prevents
+ // locking issues when locking the 3rd star. Fixes #9961.
+ _mover->transitionBetweenPosOrients(newPos, newPos, oldOr, newOr);
CStarVector *sv = new CStarVector(this, thirdStarPosition);
_mover->setVector(sv);