diff options
author | Travis Howell | 2005-10-14 08:39:27 +0000 |
---|---|---|
committer | Travis Howell | 2005-10-14 08:39:27 +0000 |
commit | 17f251a37fb1a88867a22095ee2e635e2a2da923 (patch) | |
tree | cda103b4e60c09bdac40c80127e6f64593fc2403 /scumm | |
parent | 0436bdeb0fd3ed1bbe20d337c62efc2afad60b01 (diff) | |
download | scummvm-rg350-17f251a37fb1a88867a22095ee2e635e2a2da923.tar.gz scummvm-rg350-17f251a37fb1a88867a22095ee2e635e2a2da923.tar.bz2 scummvm-rg350-17f251a37fb1a88867a22095ee2e635e2a2da923.zip |
loadFlObject() should use object index, when checking if object is already loaded. Matches original games and prevent multiple load of same flObject in HE games.
svn-id: r19076
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/object.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp index 5190890f0a..0fb9895e65 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -1695,17 +1695,17 @@ int ScummEngine::findFlObjectSlot() { void ScummEngine::loadFlObject(uint object, uint room) { FindObjectInRoom foir; - int slot, objslot; + int i, slot, objslot; ObjectData *od; byte *flob; uint32 obcd_size, obim_size, flob_size; bool isRoomLocked, isRoomScriptsLocked; // Don't load an already loaded object - if (whereIsObject(object) != WIO_NOT_FOUND) + if (getObjectIndex(object) != -1) return; - int i; + // Don't load an already stored object for (i = 0; i < _numStoredFlObjects; i++) { if (_storedFlObjects[i].obj_nr == object) return; |