mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 13:42:02 +00:00
FULLPIPE: Fix wrong indexes in Floaters.
Thanks to eriktorbjorn.
This commit is contained in:
parent
166b6edc2a
commit
662bbfaffe
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user