Ticket #2826: mi2-rope.diff
File mi2-rope.diff, 996 bytes (added by , 18 years ago) |
---|
-
engines/scumm/object.cpp
1225 1225 1226 1226 debug(1, "Adding object %d from room %d into inventory", obj, room); 1227 1227 1228 if (whereIsObject(obj) == WIO_FLOBJECT) { 1228 switch (whereIsObject(obj)) { 1229 case WIO_INVENTORY: 1230 // The object is already carried. This can happen when pulling 1231 // the rope in Monkey Island 2. See bug #1555938. 1232 return; 1233 case WIO_FLOBJECT: 1229 1234 idx = getObjectIndex(obj); 1230 1235 assert(idx >= 0); 1231 1236 ptr = getResourceAddress(rtFlObject, _objs[idx].fl_object_index) + 8; 1232 1237 size = READ_BE_UINT32(ptr + 4); 1233 } else { 1238 break; 1239 default: 1234 1240 findObjectInRoom(&foir, foCodeHeader, obj, room); 1235 1241 if (_game.features & GF_OLD_BUNDLE) 1236 1242 size = READ_LE_UINT16(foir.obcd); … … 1239 1245 else 1240 1246 size = READ_BE_UINT32(foir.obcd + 4); 1241 1247 ptr = foir.obcd; 1248 break; 1242 1249 } 1243 1250 1244 1251 slot = getInventorySlot();