mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
tr2/objects/harpoon_bolt: fix harpoon test on invalid objects
This fixes testing harpoon colliding with invalid objects, such as sprite pickups. Resolves #2718.
This commit is contained in:
parent
9fab033d89
commit
bf54cf9130
1 changed files with 3 additions and 0 deletions
|
@ -62,6 +62,9 @@ static void M_Control(const int16_t item_num)
|
||||||
}
|
}
|
||||||
|
|
||||||
const ANIM_FRAME *const frame = Item_GetBestFrame(target_item);
|
const ANIM_FRAME *const frame = Item_GetBestFrame(target_item);
|
||||||
|
if (frame == nullptr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const BOUNDS_16 *const bounds = &frame->bounds;
|
const BOUNDS_16 *const bounds = &frame->bounds;
|
||||||
|
|
||||||
const int32_t cdy = item->pos.y - target_item->pos.y;
|
const int32_t cdy = item->pos.y - target_item->pos.y;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue