Fix crash in _map_age_dead_critters

This commit is contained in:
Vasilii Rogin 2023-03-14 19:41:11 +02:00
parent e23b39abaa
commit e6f6ba5c8b
1 changed files with 3 additions and 0 deletions

View File

@ -2146,6 +2146,8 @@ Object* objectFindFirst()
return NULL;
}
gObjectFindTile++;
while (objectListNode != NULL) {
if (artIsObjectTypeHidden(FID_TYPE(objectListNode->obj->fid)) == 0) {
gObjectFindLastObjectListNode = objectListNode;
@ -2199,6 +2201,7 @@ Object* objectFindFirstAtElevation(int elevation)
if (object->elevation == elevation) {
if (!artIsObjectTypeHidden(FID_TYPE(object->fid))) {
gObjectFindLastObjectListNode = objectListNode;
gObjectFindTile++;
return object;
}
}