aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorPaul Gilbert2015-02-15 09:50:14 -0500
committerPaul Gilbert2015-02-15 09:50:14 -0500
commit7739e12e42edae68264a9675ede1bd840ae3be6b (patch)
tree98ca3c8a9b4c166f9fcb62b66953aedc39de9100 /engines/mads
parent6dcc8b03b89902020f7a52f4823706bc8376e0b3 (diff)
downloadscummvm-rg350-7739e12e42edae68264a9675ede1bd840ae3be6b.tar.gz
scummvm-rg350-7739e12e42edae68264a9675ede1bd840ae3be6b.tar.bz2
scummvm-rg350-7739e12e42edae68264a9675ede1bd840ae3be6b.zip
MADS: Stop player disappearing after cutscene of fish being eaten
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/player.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp
index bde313af8d..e7993f378a 100644
--- a/engines/mads/player.cpp
+++ b/engines/mads/player.cpp
@@ -509,10 +509,11 @@ void Player::idle() {
return;
}
- if ((_spritesStart + _spritesIdx) < 0 || !_spriteSetsPresent[_spritesStart + _spritesIdx])
+ int idx = _spritesStart + _spritesIdx;
+ if (idx < 0 || (idx < PLAYER_SPRITES_FILE_COUNT && !_spriteSetsPresent[idx]))
return;
- SpriteAsset &spriteSet = *scene._sprites[_spritesStart + _spritesIdx];
+ SpriteAsset &spriteSet = *scene._sprites[idx];
assert(spriteSet._charInfo);
if (spriteSet._charInfo->_numEntries == 0)
// No entries, so exit immediately