[Scummvm-git-logs] scummvm master -> 301cac15eea512cb24ac419c5f99d1f972bb9b93

dreammaster dreammaster at scummvm.org
Wed Jun 7 04:07:24 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
301cac15ee TITANIC: Fix calculations in DVector fn1


Commit: 301cac15eea512cb24ac419c5f99d1f972bb9b93
    https://github.com/scummvm/scummvm/commit/301cac15eea512cb24ac419c5f99d1f972bb9b93
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-06-06T22:07:15-04:00

Commit Message:
TITANIC: Fix calculations in DVector fn1

Changed paths:
    engines/titanic/star_control/dvector.cpp


diff --git a/engines/titanic/star_control/dvector.cpp b/engines/titanic/star_control/dvector.cpp
index 77357fa..23d601e 100644
--- a/engines/titanic/star_control/dvector.cpp
+++ b/engines/titanic/star_control/dvector.cpp
@@ -52,9 +52,11 @@ void DVector::fn2(double angle) {
 	const double FACTOR = 2 * M_PI / 360.0;
 	double sinVal = sin(angle * FACTOR);
 	double cosVal = cos(angle * FACTOR);
+	double x = cosVal * _x - sinVal * _z;
+	double z = cosVal * _z + sinVal * _x;
 
-	_x = cosVal * _x - sinVal * _z;
-	_z = cosVal * _z + sinVal * _x;
+	_x = x;
+	_z = z;
 }
 
 DVector DVector::fn3() const {





More information about the Scummvm-git-logs mailing list