diff options
author | Paul Gilbert | 2017-06-06 22:07:15 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-06-06 22:07:15 -0400 |
commit | 301cac15eea512cb24ac419c5f99d1f972bb9b93 (patch) | |
tree | 7eabb3747e2c470fe21822aa85fe367d7fbf2e76 /engines | |
parent | cc5629014e7f8182ea4c2819112bc97401624eca (diff) | |
download | scummvm-rg350-301cac15eea512cb24ac419c5f99d1f972bb9b93.tar.gz scummvm-rg350-301cac15eea512cb24ac419c5f99d1f972bb9b93.tar.bz2 scummvm-rg350-301cac15eea512cb24ac419c5f99d1f972bb9b93.zip |
TITANIC: Fix calculations in DVector fn1
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/star_control/dvector.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/titanic/star_control/dvector.cpp b/engines/titanic/star_control/dvector.cpp index 77357fa923..23d601eca9 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 { |