[Scummvm-git-logs] scummvm master -> e61cb2285f33656ebeafd76e0cd7f74f0f2dd965
sev-
sev at scummvm.org
Sat Oct 1 14:48:27 CEST 2016
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
342c9cdc36 FULLPIPE: Scene28: Fix flies priority
e61cb2285f FULLPIPE: Fix MctlGraph::getNearestLink
Commit: 342c9cdc36d1e94e0edd1ad022c99040fdc89198
https://github.com/scummvm/scummvm/commit/342c9cdc36d1e94e0edd1ad022c99040fdc89198
Author: Retro-Junk (bambarbee at yandex.ru)
Date: 2016-10-01T14:47:44+02:00
Commit Message:
FULLPIPE: Scene28: Fix flies priority
Changed paths:
engines/fullpipe/scenes/scene28.cpp
diff --git a/engines/fullpipe/scenes/scene28.cpp b/engines/fullpipe/scenes/scene28.cpp
index b9cdf7a..8d829d7 100644
--- a/engines/fullpipe/scenes/scene28.cpp
+++ b/engines/fullpipe/scenes/scene28.cpp
@@ -172,12 +172,12 @@ void sceneHandler28_turnOn2() {
if (g_vars->scene28_fliesArePresent) {
g_fp->_floaters->genFlies(g_fp->_currentScene, 1013, 329, 60, 4);
- g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val15 = 30;
+ g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val13 = 30;
g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->countdown = g_fp->_rnd->getRandomNumber(12) + 12;
g_fp->_floaters->genFlies(g_fp->_currentScene, 1074, 311, 60, 4);
- g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val15 = 30;
+ g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->val13 = 30;
g_fp->_floaters->_array2[g_fp->_floaters->_array2.size() - 1]->countdown = g_fp->_rnd->getRandomNumber(12) + 12;
}
Commit: e61cb2285f33656ebeafd76e0cd7f74f0f2dd965
https://github.com/scummvm/scummvm/commit/e61cb2285f33656ebeafd76e0cd7f74f0f2dd965
Author: Retro-Junk (bambarbee at yandex.ru)
Date: 2016-10-01T14:48:06+02:00
Commit Message:
FULLPIPE: Fix MctlGraph::getNearestLink
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 7440323..331799f 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -2735,16 +2735,16 @@ MovGraphLink *MctlGraph::getNearestLink(int x, int y) {
double n1y = lnk->_graphSrc->_y;
double n2x = lnk->_graphDst->_x;
double n2y = lnk->_graphDst->_y;
- double n1dx = n1x - x;
+ double n1dx = x - n1x;
double n1dy = n1y - y;
double dst1 = sqrt(n1dy * n1dy + n1dx * n1dx);
double coeff1 = ((n1y - n2y) * n1dy + (n2x - n1x) * n1dx) / lnk->_length / dst1;
double dst3 = coeff1 * dst1;
double dst2 = sqrt(1.0 - coeff1 * coeff1) * dst1;
- if (coeff1 * dst1 < 0.0) {
+ if (dst3 < 0.0) {
dst3 = 0.0;
- dst2 = sqrt(n1dy * n1dy + n1dx * n1dx);
+ dst2 = sqrt((n1x - x) * (n1x - x) + (n1y - y) * (n1y - y));
}
if (dst3 > lnk->_length) {
dst3 = lnk->_length;
More information about the Scummvm-git-logs
mailing list