tr2/objects/harpoon_bolt: fix harpoon test on invalid objects
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped

This fixes testing harpoon colliding with invalid objects, such as
sprite pickups.

Resolves #2718.
This commit is contained in:
lahm86 2025-04-08 21:38:31 +01:00
parent 9fab033d89
commit bf54cf9130

View file

@ -62,6 +62,9 @@ static void M_Control(const int16_t item_num)
}
const ANIM_FRAME *const frame = Item_GetBestFrame(target_item);
if (frame == nullptr) {
continue;
}
const BOUNDS_16 *const bounds = &frame->bounds;
const int32_t cdy = item->pos.y - target_item->pos.y;