diff options
author | Eugene Sandulenko | 2014-01-05 02:32:30 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2014-01-05 02:32:30 +0200 |
commit | 662bbfaffe026fbb1f73d7f5b0c23bcd54aecd59 (patch) | |
tree | 361e851f38ebc8ab78b63940f0d8a4f577feba81 | |
parent | 166b6edc2a5030b6e00e6e740071e42438436019 (diff) | |
download | scummvm-rg350-662bbfaffe026fbb1f73d7f5b0c23bcd54aecd59.tar.gz scummvm-rg350-662bbfaffe026fbb1f73d7f5b0c23bcd54aecd59.tar.bz2 scummvm-rg350-662bbfaffe026fbb1f73d7f5b0c23bcd54aecd59.zip |
FULLPIPE: Fix wrong indexes in Floaters.
Thanks to eriktorbjorn.
-rw-r--r-- | engines/fullpipe/floaters.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/fullpipe/floaters.cpp b/engines/fullpipe/floaters.cpp index 7ad634f62b..9e5ca7b3f1 100644 --- a/engines/fullpipe/floaters.cpp +++ b/engines/fullpipe/floaters.cpp @@ -111,7 +111,7 @@ void Floaters::genFlies(Scene *sc, int x, int y, int priority, int flags) { else nummoves = ani->_movement->_dynamicPhases.size(); - ani->_movement->setDynamicPhaseIndex(g_fp->_rnd->getRandomNumber(nummoves)); + ani->_movement->setDynamicPhaseIndex(g_fp->_rnd->getRandomNumber(nummoves - 1)); FloaterArray2 *arr2 = new FloaterArray2; @@ -190,7 +190,7 @@ void Floaters::update() { _array2[i]->val3 = _array2[i]->val7; } else { if (_array2[i]->fflags & 2) { - int idx1 = g_fp->_rnd->getRandomNumber(_array1.size()); + int idx1 = g_fp->_rnd->getRandomNumber(_array1.size() - 1); _array2[i]->val2 = _array1[idx1]->val1; _array2[i]->val3 = _array1[idx1]->val2; |