From 74da0c2ef7a5a77ddfcda26b28ebdeab68a9f8f5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 16 Mar 2014 15:50:17 -0400 Subject: MADS: Fix for loading player sprites during scene startup --- engines/mads/player.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engines/mads/player.cpp b/engines/mads/player.cpp index fe1065cbed..c3ce270954 100644 --- a/engines/mads/player.cpp +++ b/engines/mads/player.cpp @@ -104,10 +104,12 @@ bool Player::loadSprites(const Common::String &prefix) { _highSprites = true; _spriteSetsPresent[fileIndex] = true; - int setIndex = _vm->_game->_scene._sprites.addSprites(setName, 4); - if (setIndex >= 0) { + + int setIndex = -1; + if (Common::File::exists(setName)) { + setIndex = _vm->_game->_scene._sprites.addSprites(setName, 4); ++_numSprites; - } else if (fileIndex >= 5) { + } else if (fileIndex < 5) { _highSprites = 0; return true; } else { -- cgit v1.2.3